[java-identity-provider COMMIT] in /trunk: idp-authn-api/pom.xml idp-authn-api/src/main/java/net/shibboleth/idp/authn...
Cantor, Scott
cantor.2 at osu.edu
Tue Sep 20 15:45:33 EDT 2016
> But if I were to want to add a timer around particular actions, I suspect that
> would get very ugly fast, but might be pretty easy to do with an agent. On
> the other hand, I'm not sure the agent could do it conditionally, and timings
> are certainly something you might want to do conditionally.
After looking at the decidedly complex configuration involved with using agents, I think we have the advantage of a lot of common base classes for our significant functional code and we could take advantage of that to offload much of the code bloat and complexity involved in doing Timers around business logic.
I suspect we could make any actions measurable with the code I already wrote, and probably use some indirection there to let people control the labels used so that a given action class might invoke a start or stop metric named in some arbitrary way. So in effect you could tell the system at runtime what timer to start or stop and thus measure arbitrary start/stop points in the code sequence, all without hardwiring it into any of our actions.
And if we're willing to pay the logger lookup overhead to fetch the Timers, it would be on or off dynamically, which is kind of the holy grail here.
I might be missing something, apart from the fact that obviously not every last bit of code is an Action, but most of the interesting code is.
-- Scott
More information about the dev
mailing list