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
02230445
Commit
02230445
authored
May 27, 2016
by
Eric Fiselier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move UnitTime helpers to reporter.h
parent
1b263fe6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
benchmark_api.h
include/benchmark/benchmark_api.h
+0
-24
reporter.h
include/benchmark/reporter.h
+24
-0
No files found.
include/benchmark/benchmark_api.h
View file @
02230445
...
...
@@ -236,30 +236,6 @@ enum TimeUnit {
kMillisecond
};
inline
const
char
*
GetTimeUnitString
(
TimeUnit
unit
)
{
switch
(
unit
)
{
case
kMillisecond
:
return
"ms"
;
case
kMicrosecond
:
return
"us"
;
case
kNanosecond
:
default:
return
"ns"
;
}
}
inline
double
GetTimeUnitMultiplier
(
TimeUnit
unit
)
{
switch
(
unit
)
{
case
kMillisecond
:
return
1e3
;
case
kMicrosecond
:
return
1e6
;
case
kNanosecond
:
default:
return
1e9
;
}
}
// BigO is passed to a benchmark in order to specify the asymptotic computational
// complexity for the benchmark. In case oAuto is selected, complexity will be
// calculated automatically to the best fit.
...
...
include/benchmark/reporter.h
View file @
02230445
...
...
@@ -187,5 +187,29 @@ private:
void
PrintRunData
(
const
Run
&
report
);
};
inline
const
char
*
GetTimeUnitString
(
TimeUnit
unit
)
{
switch
(
unit
)
{
case
kMillisecond
:
return
"ms"
;
case
kMicrosecond
:
return
"us"
;
case
kNanosecond
:
default:
return
"ns"
;
}
}
inline
double
GetTimeUnitMultiplier
(
TimeUnit
unit
)
{
switch
(
unit
)
{
case
kMillisecond
:
return
1e3
;
case
kMicrosecond
:
return
1e6
;
case
kNanosecond
:
default:
return
1e9
;
}
}
}
// end namespace benchmark
#endif // BENCHMARK_REPORTER_H_
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