No commit activity in last 3 years
No release in over 3 years
Fluent input plugin for Werkzeug WSGI application profiler statistics.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

 Project Readme

Build Status Coverage Status Code Climate Dependency Status

fluent-plugin-werkzeug-profiler

Component

WerkzeugProfilerInput

Fluent input plugin for Werkzeug WSGI application profiler statistics.

For example, Werkzeug profiler output following log.

----------------------------------------
PATH: '/'
         15724 function calls (14741 primitive calls) in 0.418 seconds

   Ordered by: internal time, call count
   List reduced from 490 to 30 due to restriction <30>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        2    0.226    0.113    0.226    0.113 {method 'query' of '_mysql.connection' objects}
        1    0.000    0.000    0.026    0.026 build/bdist.linux-x86_64/egg/MySQLdb/__init__.py:78(Connect)
    99/31    0.000    0.000    0.000    0.000 /usr/lib/python2.7/sre_parse.py:141(getwidth)

----------------------------------------

Results are as follows.

{ "uri"=>"/", "tot_ncalls"=>"2", "prim_ncalls"=>"2", "tottime"=>"0.226", 
  "tot_percall"=>"0.113", "cumtime"=>"0.226", "cum_percall"=>"0.113", 
  "filename:lineno(function)"=>"{method 'query' of '_mysql.connection' objects}" }, 
{ "uri"=>"/", "tot_ncalls"=>"1", "prim_ncalls"=>"1", "tottime"=>"0.000", 
  "tot_percall"=>"0.000", "cumtime"=>"0.026", "cum_percall"=>"0.026", 
  "filename:lineno(function)"=>"build/bdist.linux- x86_64/egg/MySQLdb/__init__.py:78(Connect)" }, 
{ "uri"=>"/", "tot_ncalls"=>"99", "prim_ncalls"=>"31", "tottime"=>"0.000", 
"tot_percall"=>"0.000", "cumtime"=>"0.000", "cum_percall"=>"0.000", 
    ["filename:lineno(function)"=>"/usr/lib/python2.7/sre_parse.py:141(getwidth)" }

Installation

$ gem install fluent-plugin-werkzeug-profiler

Configuration

WerkzeugProfilerInput

<source>
  type werkzeug_profiler
  path path/to/werkzeug.log
  tag werkzeug.webserver
</source>

License

This software is released under the MIT License, see LICENSE.txt.