mozilla-services / hindsight

Hindsight - light weight data processing skeleton
Mozilla Public License 2.0
668 stars 55 forks source link

Create a utility to profile plugin execution timers #144

Closed trink closed 6 years ago

trink commented 6 years ago

As per comment (2): https://github.com/mozilla-services/hindsight/pull/137#issuecomment-350621435 The utility will look for matched sets of start/end prefixes followed by a colon and the timer name then compute the count, min, max, average and standard deviation outputting the result as a tsv.

Code

print("START_TIMER:foo")
--- do foo
print("END_TIMER:foo")

Log

1515017287796327572 [debug] START_TIMER:foo
1515017287796347586 [debug] END_TIMER:foo

Output

Timer Count Min Max Avg SD
foo 1 20014 20014 20014 0