Utils: Support sample based histogram
Utils: Support sample based histogram

The histogrm object is used both as a general counter for the number of
events and for statistics and sampling.

This chanage the histogram implementation, so it would support spares
sampling while keeping the total number of event accurate.

The implementation includes the following:
Remove the template nature of the histogram, as it is used only for
timer and use the name ihistogram instead.

If in the future we'll need a histogram for other types, we can use the
histogrma name for it.

a total counter was added that count the number of events that are part
of the statistic calculation.

A helper methods where added to the ihistogram to handle the latency
counter object.

According to the sample mask it would mark the latency object as start
if the counter and the mask are non zero and it would accept the latency
object in its mark method, in which if the latency was not start, it
will not be added and only the 'count' counter that counts the total
number of events will be incremented.

This should reduce the impact of latency calculation to a neglectable
effect.

Signed-off-by: Amnon Heiman <ed5fc74c4692051ad0b19749fd7cea6ec2d74b9e@cloudius-systems.com>

stamhe/scylla,bowlofstew/scylla,kjniemi/scylla,glommer/scylla,dwdm/scylla,justintung/scylla,linearregression/scylla,aruanruan/scylla,senseb/scylla,asias/scylla,rentongzhang/scylla,scylladb/scylla,linearregression/scylla,raphaelsc/scylla,gwicke/scylla,stamhe/scylla,justintung/scylla,victorbriz/scylla,rentongzhang/scylla,phonkee/scylla,rluta/scylla,wildinto/scylla,scylladb/scylla,shaunstanislaus/scylla,capturePointer/scylla,guiquanz/scylla,kjniemi/scylla,bowlofstew/scylla,tempbottle/scylla,asias/scylla,capturePointer/scylla,gwicke/scylla,rluta/scylla,acbellini/scylla,raphaelsc/scylla,eklitzke/scylla,bowlofstew/scylla,shaunstanislaus/scylla,rentongzhang/scylla,senseb/scylla,eklitzke/scylla,scylladb/scylla,eklitzke/scylla,senseb/scylla,stamhe/scylla,acbellini/scylla,wildinto/scylla,avikivity/scylla,aruanruan/scylla,asias/scylla,acbellini/scylla,gwicke/scylla,justintung/scylla,dwdm/scylla,scylladb/scylla,guiquanz/scylla,victorbriz/scylla,glommer/scylla,tempbottle/scylla,kangkot/scylla,respu/scylla,duarten/scylla,guiquanz/scylla,avikivity/scylla,kjniemi/scylla,respu/scylla,shaunstanislaus/scylla,phonkee/scylla,linearregression/scylla,duarten/scylla,wildinto/scylla,victorbriz/scylla,phonkee/scylla,aruanruan/scylla,tempbottle/scylla,duarten/scylla,raphaelsc/scylla,glommer/scylla,kangkot/scylla,respu/scylla,rluta/scylla,dwdm/scylla,avikivity/scylla,capturePointer/scylla,kangkot/scylla