| Index: src/counters.cc
|
| diff --git a/src/counters.cc b/src/counters.cc
|
| index ec5d21d47c3a415846f9e5c5c7537ddf04972d82..8cae329f5215ef6ae141f1f1b27d9bf6d5dc4329 100644
|
| --- a/src/counters.cc
|
| +++ b/src/counters.cc
|
| @@ -47,8 +47,11 @@ void HistogramTimer::Start() {
|
| // Stop the timer and record the results.
|
| void HistogramTimer::Stop() {
|
| if (Enabled()) {
|
| - // Compute the delta between start and stop, in milliseconds.
|
| - AddSample(static_cast<int>(timer_.Elapsed().InMilliseconds()));
|
| + int64_t sample = resolution_ == MICROSECOND
|
| + ? timer_.Elapsed().InMicroseconds()
|
| + : timer_.Elapsed().InMilliseconds();
|
| + // Compute the delta between start and stop, in microseconds.
|
| + AddSample(static_cast<int>(sample));
|
| timer_.Stop();
|
| }
|
| Logger::CallEventLogger(isolate(), name(), Logger::END, true);
|
| @@ -61,13 +64,13 @@ Counters::Counters(Isolate* isolate) {
|
| HISTOGRAM_RANGE_LIST(HR)
|
| #undef HR
|
|
|
| -#define HT(name, caption) \
|
| - name##_ = HistogramTimer(#caption, 0, 10000, 50, isolate);
|
| +#define HT(name, caption, max, res) \
|
| + name##_ = HistogramTimer(#caption, 0, max, HistogramTimer::res, 50, isolate);
|
| HISTOGRAM_TIMER_LIST(HT)
|
| #undef HT
|
|
|
| #define AHT(name, caption) \
|
| - name##_ = AggregatableHistogramTimer(#caption, 0, 10000, 50, isolate);
|
| + name##_ = AggregatableHistogramTimer(#caption, 0, 10000000, 50, isolate);
|
| AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT)
|
| #undef AHT
|
|
|
| @@ -157,7 +160,7 @@ void Counters::ResetHistograms() {
|
| HISTOGRAM_RANGE_LIST(HR)
|
| #undef HR
|
|
|
| -#define HT(name, caption) name##_.Reset();
|
| +#define HT(name, caption, max, res) name##_.Reset();
|
| HISTOGRAM_TIMER_LIST(HT)
|
| #undef HT
|
|
|
|
|