summaryrefslogtreecommitdiffstats
path: root/base/run_all_perftests.cc
diff options
context:
space:
mode:
authordeanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-27 13:48:03 +0000
committerdeanm@google.com <deanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-27 13:48:03 +0000
commitdb71728e5bc139ecfa97823e5613d882257cef4c (patch)
tree773f60b5e5db3b4f2e10c442f5fd11f2fa88d870 /base/run_all_perftests.cc
parent32065cfaaf2ef49d9e4cbbbcf21e92dcb3b10072 (diff)
downloadchromium_src-db71728e5bc139ecfa97823e5613d882257cef4c.zip
chromium_src-db71728e5bc139ecfa97823e5613d882257cef4c.tar.gz
chromium_src-db71728e5bc139ecfa97823e5613d882257cef4c.tar.bz2
Make perftimer and run_all_perftests compile on Posix. Stub out a few things into process_util_posix, and add a function to raise to a high priority.
BUG=1343318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1438 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/run_all_perftests.cc')
-rw-r--r--base/run_all_perftests.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/base/run_all_perftests.cc b/base/run_all_perftests.cc
index 967aeb9..1ecf8d1 100644
--- a/base/run_all_perftests.cc
+++ b/base/run_all_perftests.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <windows.h>
-
#include "base/command_line.h"
+#include "base/debug_util.h"
#include "base/perftimer.h"
+#include "base/process_util.h"
#include "base/string_util.h"
#include "base/test_suite.h"
@@ -24,8 +24,8 @@ class PerfTestSuite : public TestSuite {
// Raise to high priority to have more precise measurements. Since we don't
// aim at 1% precision, it is not necessary to run at realtime level.
- if (!IsDebuggerPresent())
- SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
+ if (!DebugUtil::BeingDebugged())
+ process_util::RaiseProcessToHighPriority();
TestSuite::Initialize();
}