Hi All,

Using the java client, one usually calls Summary.observe with one amount 
each call. 
In my case I'm timing the operations of an insert to the database, and 
those inserts are batches of a variable amount of records.
I cannot time each record insertion separately, and since the batches are 
of variable size, I would also not like to just time the batches.

I can use one of two approaches:
1. Time the batch, divide by the number of records in the batch, and call 
observe N times (where N is the number of records in the batch) with the 
average time.
2. Create two counters instead and just sum the times and records myself 
separately.

I was thinking that more elegantly a method for recording multiple 
observations could be added to Summary that would take both a total amount 
observed and an incrementation number, such that it would increment the 
counter by the incrementation number. That way Summary would handle this 
all itself and no workarounds would be necessary.

Any thoughts on this? Seems straightforward to implement, but maybe I'm 
going about it the wrong way.
Any comments or pointers for a first-timer are welcome.

Thanks,
Oren


-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-developers/6987053c-2fb5-4b0f-b1da-e43a6686a639%40googlegroups.com.

Reply via email to