Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: src/counters.cc

Issue 875873002: Rescale histogram timers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/counters.h ('K') | « src/counters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.cc
diff --git a/src/counters.cc b/src/counters.cc
index ec5d21d47c3a415846f9e5c5c7537ddf04972d82..63113a182c5e27688a020d051307640b44c48ed9 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -47,8 +47,8 @@ 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()));
+ // Compute the delta between start and stop, in microseconds.
+ AddSample(static_cast<int>(timer_.Elapsed().InMicroseconds()));
timer_.Stop();
}
Logger::CallEventLogger(isolate(), name(), Logger::END, true);
@@ -61,13 +61,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) \
+ name##_ = HistogramTimer(#caption, 0, max, 50, isolate);
HISTOGRAM_TIMER_LIST(HT)
#undef HT
#define AHT(name, caption) \
- name##_ = AggregatableHistogramTimer(#caption, 0, 10000, 50, isolate);
+ name##_ = AggregatableHistogramTimer(#caption, 0, 1000000, 50, isolate);
vogelheim 2015/01/26 14:46:50 One more '0' please. Compile times in single digit
Yang 2015/01/26 15:09:07 Done.
AGGREGATABLE_HISTOGRAM_TIMER_LIST(AHT)
#undef AHT
@@ -157,7 +157,7 @@ void Counters::ResetHistograms() {
HISTOGRAM_RANGE_LIST(HR)
#undef HR
-#define HT(name, caption) name##_.Reset();
+#define HT(name, caption, max) name##_.Reset();
HISTOGRAM_TIMER_LIST(HT)
#undef HT
« src/counters.h ('K') | « src/counters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698