Coder Social home page Coder Social logo

activity monitors??? about zodb HOT 5 OPEN

zopefoundation avatar zopefoundation commented on May 30, 2024
activity monitors???

from zodb.

Comments (5)

jamadden avatar jamadden commented on May 30, 2024

Definitely keep it. We make use of it to log load and store counts and record those statistics to statsd and maybe other things I'm forgetting.

We currently have our own base class that all of our monitors inherit from so that we can chain them together:

def register_subscriber(event):
    """
    Subscriber to the :class:`zope.processlifetime.IDatabaseOpenedWithRoot`
    that registers an activity monitor.
    """
    # IDatabaseOpened fires for each database, so if we sub to that we'd do this many times.
    # WithRoot fires only once.
    for database in event.database.databases.values():
        dam = database.getActivityMonitor()
        database.setActivityMonitor(StatsdActivityMonitor(LogActivityMonitor(dam)))

from zodb.

jamadden avatar jamadden commented on May 30, 2024

I gather that at least sometimes some others found it useful too. Although they have perhaps not been maintained 😄 . (And perhaps this is another exmple of existing functionality taking work to discover. )

from zodb.

jimfulton avatar jimfulton commented on May 30, 2024

haha zc.zodbactivitylog

from zodb.

jimfulton avatar jimfulton commented on May 30, 2024

I guess it should get documented.

from zodb.

jamadden avatar jamadden commented on May 30, 2024

haha zc.zodbactivitylog

Which turns out to be remarkably like our own solution. I honestly don't think I'd come across it until now. Great minds think alike, as they say, or at least, sometimes later lesser minds like mine experience inspiration without knowing it.

from zodb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.