Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
1b9e55c2
Commit
1b9e55c2
authored
Mar 26, 2015
by
Eric Fiselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove walltime implementation tests and expose less internals
parent
d3e0671a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
43 deletions
+3
-43
walltime.cc
src/walltime.cc
+3
-3
walltime.h
src/walltime.h
+0
-2
CMakeLists.txt
test/CMakeLists.txt
+0
-2
walltime_test.cc
test/walltime_test.cc
+0
-36
No files found.
src/walltime.cc
View file @
1b9e55c2
...
@@ -163,9 +163,6 @@ WallTimeImp::WallTimeImp()
...
@@ -163,9 +163,6 @@ WallTimeImp::WallTimeImp()
last_adjust_time_
=
static_cast
<
uint32_t
>
(
uint64_t
(
base_cycletime_
)
>>
32
);
last_adjust_time_
=
static_cast
<
uint32_t
>
(
uint64_t
(
base_cycletime_
)
>>
32
);
}
}
}
// end anonymous namespace
WallTime
CPUWalltimeNow
()
{
WallTime
CPUWalltimeNow
()
{
static
WallTimeImp
&
imp
=
WallTimeImp
::
GetWallTimeImp
();
static
WallTimeImp
&
imp
=
WallTimeImp
::
GetWallTimeImp
();
return
imp
.
Now
();
return
imp
.
Now
();
...
@@ -191,6 +188,9 @@ bool UseCpuCycleClock() {
...
@@ -191,6 +188,9 @@ bool UseCpuCycleClock() {
return
useWallTime
;
return
useWallTime
;
}
}
}
// end anonymous namespace
// WallTimeImp doesn't work when CPU Scaling is enabled. If CPU Scaling is
// WallTimeImp doesn't work when CPU Scaling is enabled. If CPU Scaling is
// enabled at the start of the program then std::chrono::system_clock is used
// enabled at the start of the program then std::chrono::system_clock is used
// instead.
// instead.
...
...
src/walltime.h
View file @
1b9e55c2
...
@@ -7,8 +7,6 @@ namespace benchmark {
...
@@ -7,8 +7,6 @@ namespace benchmark {
typedef
double
WallTime
;
typedef
double
WallTime
;
namespace
walltime
{
namespace
walltime
{
WallTime
CPUWalltimeNow
();
WallTime
ChronoWalltimeNow
();
WallTime
Now
();
WallTime
Now
();
}
// end namespace walltime
}
// end namespace walltime
...
...
test/CMakeLists.txt
View file @
1b9e55c2
...
@@ -32,5 +32,3 @@ compile_benchmark_test(cxx03_test)
...
@@ -32,5 +32,3 @@ compile_benchmark_test(cxx03_test)
set_target_properties
(
cxx03_test
set_target_properties
(
cxx03_test
PROPERTIES COMPILE_FLAGS
"
${
CXX03_FLAGS
}
"
)
PROPERTIES COMPILE_FLAGS
"
${
CXX03_FLAGS
}
"
)
add_test
(
cxx03 cxx03_test
)
add_test
(
cxx03 cxx03_test
)
compile_benchmark_test
(
walltime_test
)
test/walltime_test.cc
deleted
100644 → 0
View file @
d3e0671a
#include <cstddef>
#include "benchmark/benchmark_api.h"
#include "../src/walltime.h"
void
BM_CPUTimeNow
(
benchmark
::
State
&
state
)
{
using
benchmark
::
walltime
::
CPUWalltimeNow
;
while
(
state
.
KeepRunning
())
{
benchmark
::
WallTime
volatile
now
;
now
=
CPUWalltimeNow
();
now
=
CPUWalltimeNow
();
now
=
CPUWalltimeNow
();
now
=
CPUWalltimeNow
();
now
=
CPUWalltimeNow
();
((
void
)
now
);
}
}
BENCHMARK
(
BM_CPUTimeNow
);
void
BM_ChronoTimeNow
(
benchmark
::
State
&
state
)
{
using
benchmark
::
walltime
::
ChronoWalltimeNow
;
while
(
state
.
KeepRunning
())
{
benchmark
::
WallTime
volatile
now
;
now
=
ChronoWalltimeNow
();
now
=
ChronoWalltimeNow
();
now
=
ChronoWalltimeNow
();
now
=
ChronoWalltimeNow
();
now
=
ChronoWalltimeNow
();
((
void
)
now
);
}
}
BENCHMARK
(
BM_ChronoTimeNow
);
BENCHMARK_MAIN
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment