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