1// Copyright (c) 2012 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
5#ifndef CHROME_TEST_PERF_PERF_TEST_H_
6#define CHROME_TEST_PERF_PERF_TEST_H_
7
8#include <stdio.h>
9#include <string>
10
11#include "chrome/test/base/chrome_process_util.h"
12
13namespace perf_test {
14
15// Prints IO performance data for use by perf graphs.
16void PrintIOPerfInfo(const std::string& test_name,
17                     const ChromeProcessList& chrome_processes,
18                     base::ProcessId browser_pid);
19
20void PrintIOPerfInfo(FILE* target,
21                     const std::string& test_name,
22                     const ChromeProcessList& chrome_processes,
23                     base::ProcessId browser_pid);
24
25std::string IOPerfInfoToString(const std::string& test_name,
26                               const ChromeProcessList& chrome_processes,
27                               base::ProcessId browser_pid);
28
29// Prints memory usage data for use by perf graphs.
30void PrintMemoryUsageInfo(const std::string& test_name,
31                          const ChromeProcessList& chrome_processes,
32                          base::ProcessId browser_pid);
33
34void PrintMemoryUsageInfo(FILE* target,
35                          const std::string& test_name,
36                          const ChromeProcessList& chrome_processes,
37                          base::ProcessId browser_pid);
38
39std::string MemoryUsageInfoToString(const std::string& test_name,
40                                    const ChromeProcessList& chrome_processes,
41                                    base::ProcessId browser_pid);
42
43}  // namespace perf_test
44
45#endif  // CHROME_TEST_PERF_PERF_TEST_H_
46