summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@mit.edu>2011-04-18 15:13:54 -0400
committerAndy Lutomirski <luto@mit.edu>2011-04-18 15:13:54 -0400
commitdec6081b164807bdf85636ee148d7ad7db28625b (patch)
treec8b21c9ea114828a9f4187e7f8e87568143ded3c
parent8f77f8608d1d62a3b53c0927991501c4439e867f (diff)
downloadmisc-tests-dec6081b164807bdf85636ee148d7ad7db28625b.tar.gz
Show the clock being tested.
-rw-r--r--evil-clock-test.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/evil-clock-test.cc b/evil-clock-test.cc
index 847c04f..5d8f4b3 100644
--- a/evil-clock-test.cc
+++ b/evil-clock-test.cc
@@ -159,6 +159,7 @@ struct Clock<(int)RDTSC>
}
enum { is_strict = 0 };
+ static const char *name() { return "rdtsc"; }
};
template<>
@@ -180,6 +181,7 @@ struct Clock<(int)RDTSCP>
}
enum { is_strict = 0 };
+ static const char *name() { return "rdtscp"; }
};
template<>
@@ -202,6 +204,7 @@ struct Clock<(int)LFENCE_RDTSC>
}
enum { is_strict = 0 };
+ static const char *name() { return "lfence;rdtsc"; }
};
template<>
@@ -224,6 +227,7 @@ struct Clock<(int)MFENCE_RDTSC>
}
enum { is_strict = 1 };
+ static const char *name() { return "mfence;rdtsc"; }
};
template<>
@@ -243,6 +247,7 @@ struct Clock<(int)MONOTONIC>
}
enum { is_strict = 0 };
+ static const char *name() { return "CLOCK_MONOTONIC"; }
};
class TestScorer
@@ -688,6 +693,8 @@ private:
template<typename ClockType>
static void run()
{
+ printf("Will test the \"%s\" clock.\n", ClockType::name());
+
if (run_now_test) {
if (verbosity >= 1)
printf("Running now test...\n");