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