Pull request #66: add safety mesasure for monitoring in case a service didn't find any results.
Merge in RR/pyinfra from add-safety-measure to master * commit 'b985679d6b30b3a983c7b1df5fb23eef0dc95cd3': add safety mesasure for monitoring in case a service didn't find any results.
This commit is contained in:
commit
ff6f437e84
@ -46,6 +46,9 @@ class PrometheusMonitor:
|
||||
|
||||
runtime = time() - start
|
||||
|
||||
if not result:
|
||||
return result
|
||||
|
||||
processing_time_per_entity = runtime / len(result)
|
||||
|
||||
self.entity_processing_time_sum.observe(processing_time_per_entity)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user