[INN-COMMITTERS] inn/lib (timer.c Makefile)

Fabien Tassin fta at sofaraway.org
Fri Feb 9 12:10:59 UTC 2001


According to Russ Allbery:
> 
> Oh, wait... I missed something in reading your code the first time.  That
> implementation actually allows the same timer to be called at different
> levels; there can be a "history sync" at the top level and a separate
> "history sync" that's a sub-timer of "history write".  Was that
> intentional and one of the features you wanted?  If so, then my idea won't
> work, since it requires that all timers live at one and only one place in
> the tree hierarchy.

it is a wanted feature. I want to be able to see how A behaves when called
alone or from B.

A       100(5)
B      1000(100)
  A     700(70)
C     10000(1000)
  B    5000(1000)
    A  4000(1000)

This example shows that A called alone is much slower than in other cases.
With the current code, we are only able to see this :

A      4800(1075)

> >> If the above sounds good, I can do the work and change all the current
> >> timer calls.
> 
> > If you do that, I wish to add a level to each timer and an argument to
> > "ctlinnd time" with its pending option in inn.conf. If a given timer is
> > called with a level greater than the current limit, it is ignored.  It
> > will allows us to use nested timers spread at all critical points with
> > no cost for those that are not interested by them.
> 
> With the levels still being dynamically determined based on what order the
> timers are called in?  And what would the ctlinnd time option do?  I don't
> quite follow.

No. Something like this :

TMRstart(FOO, 2);
TMRstop(FOO, 2);
TMRstart(BAR, 5);
TMRstart(BAZ, 1);
TMRstop(BAZ, 1);
TMRstop(BAR, 5);

inn.conf : timer_threshold = 3;

"ctlinnd time 300" will time BAR and BAZ.
"ctlinnd time 300 1" will only time BAZ.
"ctlinnd time 300 9" will time all.

This will require to change all the timer calls that why I've started with
"If you do that".

-- 
Fabien Tassin -+- fta at sofaraway.org


More information about the inn-workers mailing list