I've noticed that Shared Object Proxy is getting a lot of bad rap
these days, so I'd appreciate some insight in how to design around it.

I'd like to write some code that tracks timing and count metrics. This
would answer the questions "How long does it take to look up / update
the data?" and "How many records did we find?"

The way I thought of implementing it was to introduce a Metrics class.
An instance would be created as the request comes in. During the
request processing, any calls to log metrics would be appended to the
class. When the request is completing, a record of all the activity
during the request is logged to disk.

This appears to be an ideal scenario for SOPs. Using SOPs, I can make
an object available through the metrics library that is accumulating
all the metrics for a particular request, not unlike the url() has
information on the particular request being made.

What are some ideas on how to do this? Do I need to keep a reference
to the metrics object and pass it around everywhere metrics might be
recorded?

If Python had dynamic variables like lisp, I'd use them for this
scenario. I imagine dynamic variables would solve a lot of problems we
face in building our web apps.

(BTW, if anyone has a metrics library they use, I'd like to not
reinvent the wheel here.)

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-disc...@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to