Skip to content

Commit

Permalink
Change "BaseTime" to "CCTZ" in benchmark names.
Browse files Browse the repository at this point in the history
  • Loading branch information
devbww committed Aug 31, 2017
1 parent f2bdef9 commit 0e2dd88
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/benchmarks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ BENCHMARK(BM_Zone_UTCTimeZone);
//
// The "UTC" variants use UTC instead of the Google/local time zone.

void BM_Time_ToDateTime_BaseTime(benchmark::State& state) {
void BM_Time_ToDateTime_CCTZ(benchmark::State& state) {
const cctz::time_zone tz = TestTimeZone();
std::chrono::system_clock::time_point tp =
std::chrono::system_clock::from_time_t(1384569027);
Expand All @@ -784,7 +784,7 @@ void BM_Time_ToDateTime_BaseTime(benchmark::State& state) {
benchmark::DoNotOptimize(cctz::convert(tp, tz));
}
}
BENCHMARK(BM_Time_ToDateTime_BaseTime);
BENCHMARK(BM_Time_ToDateTime_CCTZ);

void BM_Time_ToDateTime_Libc(benchmark::State& state) {
// No timezone support, so just use localtime.
Expand All @@ -803,7 +803,7 @@ void BM_Time_ToDateTime_Libc(benchmark::State& state) {
}
BENCHMARK(BM_Time_ToDateTime_Libc);

void BM_Time_ToDateTimeUTC_BaseTime(benchmark::State& state) {
void BM_Time_ToDateTimeUTC_CCTZ(benchmark::State& state) {
const cctz::time_zone tz = cctz::utc_time_zone();
std::chrono::system_clock::time_point tp =
std::chrono::system_clock::from_time_t(1384569027);
Expand All @@ -812,7 +812,7 @@ void BM_Time_ToDateTimeUTC_BaseTime(benchmark::State& state) {
benchmark::DoNotOptimize(cctz::convert(tp, tz));
}
}
BENCHMARK(BM_Time_ToDateTimeUTC_BaseTime);
BENCHMARK(BM_Time_ToDateTimeUTC_CCTZ);

void BM_Time_ToDateTimeUTC_Libc(benchmark::State& state) {
time_t t = 1384569027;
Expand All @@ -835,7 +835,7 @@ BENCHMARK(BM_Time_ToDateTimeUTC_Libc);
// The "UTC" variants use UTC instead of the Google/local time zone.
// The "Day0" variants require normalization of the day of month.

void BM_Time_FromDateTime_BaseTime(benchmark::State& state) {
void BM_Time_FromDateTime_CCTZ(benchmark::State& state) {
const cctz::time_zone tz = TestTimeZone();
int i = 0;
while (state.KeepRunning()) {
Expand All @@ -848,7 +848,7 @@ void BM_Time_FromDateTime_BaseTime(benchmark::State& state) {
}
}
}
BENCHMARK(BM_Time_FromDateTime_BaseTime);
BENCHMARK(BM_Time_FromDateTime_CCTZ);

void BM_Time_FromDateTime_Libc(benchmark::State& state) {
// No timezone support, so just use localtime.
Expand Down Expand Up @@ -876,16 +876,18 @@ void BM_Time_FromDateTime_Libc(benchmark::State& state) {
}
BENCHMARK(BM_Time_FromDateTime_Libc);

void BM_Time_FromDateTimeUTC_BaseTime(benchmark::State& state) {
void BM_Time_FromDateTimeUTC_CCTZ(benchmark::State& state) {
const cctz::time_zone tz = cctz::utc_time_zone();
while (state.KeepRunning()) {
benchmark::DoNotOptimize(
cctz::convert(cctz::civil_second(2014, 12, 18, 20, 16, 18), tz));
}
}
BENCHMARK(BM_Time_FromDateTimeUTC_BaseTime);
BENCHMARK(BM_Time_FromDateTimeUTC_CCTZ);

void BM_Time_FromDateTimeDay0_BaseTime(benchmark::State& state) {
// There is no BM_Time_FromDateTimeUTC_Libc.

void BM_Time_FromDateTimeDay0_CCTZ(benchmark::State& state) {
const cctz::time_zone tz = TestTimeZone();
int i = 0;
while (state.KeepRunning()) {
Expand All @@ -898,7 +900,7 @@ void BM_Time_FromDateTimeDay0_BaseTime(benchmark::State& state) {
}
}
}
BENCHMARK(BM_Time_FromDateTimeDay0_BaseTime);
BENCHMARK(BM_Time_FromDateTimeDay0_CCTZ);

void BM_Time_FromDateTimeDay0_Libc(benchmark::State& state) {
// No timezone support, so just use localtime.
Expand Down

0 comments on commit 0e2dd88

Please sign in to comment.