summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2016-01-12 13:09:39 -0800
committerChristopher Ferris <cferris@google.com>2016-01-12 13:09:39 -0800
commit85c34c3ee94998dd961b4669a9b12f714c2a035f (patch)
treecf64c3445839908fa3f0254839a7ac872b8cc050
parentaceefb77f858d7f0737d36c52b7d0641b5683636 (diff)
downloadextras-85c34c3ee94998dd961b4669a9b12f714c2a035f.tar.gz
Remove cpu benchmark.
This benchmark is completely misnamed. All it does is this in a hard loop: - Read from memory and store in a register. - Add one to the memory value. - Store that value back to memory. Since this is completely useless, I'm going to remove it. Bug: 26210850 Change-Id: If3e0af0a1faa7875d3d106cccab1ed8205847b62
-rw-r--r--micro_bench/micro_bench.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/micro_bench/micro_bench.cpp b/micro_bench/micro_bench.cpp
index b7587793..75d9f8bd 100644
--- a/micro_bench/micro_bench.cpp
+++ b/micro_bench/micro_bench.cpp
@@ -382,20 +382,6 @@ int benchmarkSleep(const char* /*name*/, const command_data_t &cmd_data, void_fu
return 0;
}
-int benchmarkCpu(const char* /*name*/, const command_data_t &cmd_data, void_func_t /*func*/) {
- // Use volatile so that the loop is not optimized away by the compiler.
- volatile int cpu_foo;
-
- MAINLOOP(cmd_data,
- for (cpu_foo = 0; cpu_foo < 100000000; cpu_foo++),
- (double)time_ns/NS_PER_SEC,
- printf("cpu took %.06f seconds\n", avg),
- printf(" cpu average %.06f seconds std dev %f min %0.6f seconds max %0.6f seconds\n", \
- running_avg, computeStdDev(square_avg, running_avg), min, max));
-
- return 0;
-}
-
int benchmarkMemset(const char *name, const command_data_t &cmd_data, void_func_t func) {
memset_func_t memset_func = reinterpret_cast<memset_func_t>(func);
BENCH_ONE_BUF(name, cmd_data, ;, memset_func(buf, i, size));
@@ -591,7 +577,6 @@ int benchmarkStrcpyCold(const char *name, const command_data_t &cmd_data, void_f
// Create the mapping structure.
function_t function_table[] = {
- { "cpu", benchmarkCpu, NULL },
{ "memcpy", benchmarkMemcpy, reinterpret_cast<void_func_t>(memcpy) },
{ "memcpy_cold", benchmarkMemcpyCold, reinterpret_cast<void_func_t>(memcpy) },
{ "memmove_forward", benchmarkMemcpy, reinterpret_cast<void_func_t>(memmove) },