1*635a8641SAndroid Build Coastguard Worker // Copyright 2013 The Chromium Authors. All rights reserved. 2*635a8641SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be 3*635a8641SAndroid Build Coastguard Worker // found in the LICENSE file. 4*635a8641SAndroid Build Coastguard Worker 5*635a8641SAndroid Build Coastguard Worker #ifndef BASE_TEST_PERF_LOG_H_ 6*635a8641SAndroid Build Coastguard Worker #define BASE_TEST_PERF_LOG_H_ 7*635a8641SAndroid Build Coastguard Worker 8*635a8641SAndroid Build Coastguard Worker namespace base { 9*635a8641SAndroid Build Coastguard Worker 10*635a8641SAndroid Build Coastguard Worker class FilePath; 11*635a8641SAndroid Build Coastguard Worker 12*635a8641SAndroid Build Coastguard Worker // Initializes and finalizes the perf log. These functions should be 13*635a8641SAndroid Build Coastguard Worker // called at the beginning and end (respectively) of running all the 14*635a8641SAndroid Build Coastguard Worker // performance tests. The init function returns true on success. 15*635a8641SAndroid Build Coastguard Worker bool InitPerfLog(const FilePath& log_path); 16*635a8641SAndroid Build Coastguard Worker void FinalizePerfLog(); 17*635a8641SAndroid Build Coastguard Worker 18*635a8641SAndroid Build Coastguard Worker // Writes to the perf result log the given 'value' resulting from the 19*635a8641SAndroid Build Coastguard Worker // named 'test'. The units are to aid in reading the log by people. 20*635a8641SAndroid Build Coastguard Worker void LogPerfResult(const char* test_name, double value, const char* units); 21*635a8641SAndroid Build Coastguard Worker 22*635a8641SAndroid Build Coastguard Worker } // namespace base 23*635a8641SAndroid Build Coastguard Worker 24*635a8641SAndroid Build Coastguard Worker #endif // BASE_TEST_PERF_LOG_H_ 25