Open allait opened 3 years ago
When NewRelicStatsLogger.timing is called with a timedelta as an argument it sends timedelta.microseconds to New Relic.
timedelta.microseconds
This attribute doesn't convert the full value to microseconds, it only contains the microseconds part of the difference:
>>> timedelta(minutes=10, seconds=10, microseconds=500).microseconds 500
.timing should probably call timedelta.total_seconds() instead:
.timing
timedelta.total_seconds()
>>> timedelta(minutes=10, seconds=10, microseconds=500).total_seconds() 610.0005
When NewRelicStatsLogger.timing is called with a timedelta as an argument it sends
timedelta.microseconds
to New Relic.This attribute doesn't convert the full value to microseconds, it only contains the microseconds part of the difference:
.timing
should probably calltimedelta.total_seconds()
instead: