1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/test/perf_time_logger.h"
7 #include "base/test/perf_log.h"
11 PerfTimeLogger::PerfTimeLogger(const char* test_name
)
12 : logged_(false), test_name_(test_name
) {}
14 PerfTimeLogger::~PerfTimeLogger() {
19 void PerfTimeLogger::Done() {
20 // we use a floating-point millisecond value because it is more
21 // intuitive than microseconds and we want more precision than
22 // integer milliseconds
23 LogPerfResult(test_name_
.c_str(), timer_
.Elapsed().InMillisecondsF(), "ms");