Add a couple more system call benchmarks.
Bug: 15387103 Change-Id: I13419ddf77d201fdbde4c784259c0cb0dcfb9a77
This commit is contained in:
@@ -35,4 +35,17 @@ static void BM_time_localtime_tz(int iters) {
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_localtime_tz);
|
||||
|
||||
#endif
|
||||
|
||||
static void BM_time_clock_gettime(int iters) {
|
||||
StartBenchmarkTiming();
|
||||
|
||||
struct timespec t;
|
||||
for (int i = 0; i < iters; ++i) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
}
|
||||
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
BENCHMARK(BM_time_clock_gettime);
|
||||
|
Reference in New Issue
Block a user