зеркало из https://github.com/mozilla/pjs.git
Bug 682869 - introduce Telemetry::AccumulateTimeDelta. r=tglek
--HG-- extra : rebase_source : e7724d2c9780d4afebd83ec0978f9feccb86ce35
This commit is contained in:
Родитель
a435c260db
Коммит
2cb62185a5
|
@ -411,6 +411,13 @@ Accumulate(ID aHistogram, PRUint32 aSample)
|
|||
h->Add(aSample);
|
||||
}
|
||||
|
||||
void
|
||||
AccumulateTimeDelta(ID aHistogram, TimeStamp start, TimeStamp end)
|
||||
{
|
||||
Accumulate(aHistogram,
|
||||
static_cast<PRUint32>((end - start).ToMilliseconds()));
|
||||
}
|
||||
|
||||
base::Histogram*
|
||||
GetHistogramById(ID id)
|
||||
{
|
||||
|
|
|
@ -66,6 +66,15 @@ HistogramCount
|
|||
*/
|
||||
void Accumulate(ID id, PRUint32 sample);
|
||||
|
||||
/**
|
||||
* Adds time delta in milliseconds to a histogram defined in TelemetryHistograms.h
|
||||
*
|
||||
* @param id - histogram id
|
||||
* @param start - start time
|
||||
* @param end - end time
|
||||
*/
|
||||
void AccumulateTimeDelta(ID id, TimeStamp start, TimeStamp end = TimeStamp::Now());
|
||||
|
||||
/**
|
||||
* Return a raw Histogram for direct manipulation for users who can not use Accumulate().
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче