18 #include <gtest/gtest.h>
27 TEST(PerfCounterTest, Basic) {
33 for (
int i = 0; i < 1000000; i++) {
34 double d1 = rand() / (double) RAND_MAX;
35 double d2 = rand() / (double) RAND_MAX;
36 result = d1*d1 + d2*d2;
40 for (
int i = 0; i < 1000000; i++) {
41 double d1 = rand() / (double) RAND_MAX;
42 double d2 = rand() / (double) RAND_MAX;
43 result = d1*d1 + d2*d2;
53 TEST(DiskInfoTest, Basic) {
63 int main(
int argc,
char **argv) {
65 ::testing::InitGoogleTest(&argc, argv);
66 return RUN_ALL_TESTS();
static const std::string & device_name(int disk_id)
Returns the device name (e.g. sda) for disk_id.
void InitCommonRuntime(int argc, char **argv, bool init_jvm, TestInfo::Mode m=TestInfo::NON_TEST)
void PrettyPrint(std::ostream *out) const
Prints out the names and results for all snapshots to 'out'.
int main(int argc, char **argv)
void Snapshot(const std::string &name="")
static std::string DebugString()
static std::string DebugString()
bool AddDefaultCounters()
static int disk_id(const char *path)