perf_log.h 804 B

123456789101112131415161718192021222324
  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.
  4. #ifndef BASE_TEST_PERF_LOG_H_
  5. #define BASE_TEST_PERF_LOG_H_
  6. namespace base {
  7. class FilePath;
  8. // Initializes and finalizes the perf log. These functions should be
  9. // called at the beginning and end (respectively) of running all the
  10. // performance tests. The init function returns true on success.
  11. bool InitPerfLog(const FilePath& log_path);
  12. void FinalizePerfLog();
  13. // Writes to the perf result log the given 'value' resulting from the
  14. // named 'test'. The units are to aid in reading the log by people.
  15. void LogPerfResult(const char* test_name, double value, const char* units);
  16. } // namespace base
  17. #endif // BASE_TEST_PERF_LOG_H_