Giter Site home page Giter Site logo

wearpants / instrument Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 0.0 264 KB

Python observability & instrumentation primitives for metrics and benchmarking

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
python metrics metrics-gathering instrumentation

instrument's People

Contributors

wearpants avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

instrument's Issues

Add rest()

That does all()-first()

Think about how to optimize common first_and_rest() use case

better names?

maybe instument.reducer / instrument.producer / instrument.function

document numpy

explaind how what the numpy module does, (what charts & stats mean, w/ some wikipedia links)
include some sample charts!

reducer optimization

would be helpful to have a version of measure_reduce that can use len() on first arg like measure_produce does on return value

tox support

add support for tox (multiple python versions)

Document concurrency model

Threads mainly, also multi processing

This is all about outputs since the instrumentation is stack local

Allow setting count within a block

Sometimes you don't know the count before a block, but rather calculate it during. Do something like

with instrument.block(name='foo') as block:
     # do stuff to produce some_number
     block.count = some_number

Yup

Rename .func() to .decorate()

Decorators can be used to wrap a generator function so that each call returns a measured iterable. This behavior is available via measure_iter.func() and so forth. The name is a bit confusing, and it'd be better to make it an active verb like measure_iter.decorate()

Maybe?

add instrument.except_*()

like prometheus, I think the following:

  • except_block
  • except_iter
  • except_func

that only measure on exceptions

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.