diff options
Diffstat (limited to 'llvm/unittests')
-rw-r--r-- | llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp | 18 | ||||
-rw-r--r-- | llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp b/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp index 5d583a08951..e1bffd63454 100644 --- a/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp +++ b/llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp @@ -27,17 +27,17 @@ TEST(ClusteringTest, Clusters3D) { // Cluster around (x=0, y=1, z=2): points {0, 3}. Points[0].Measurements = { - {"x", 0.01, 0.0, ""}, {"y", 1.02, 0.0, ""}, {"z", 1.98, 0.0, "A"}}; + {"x", 0.01, 0.0}, {"y", 1.02, 0.0}, {"z", 1.98, 0.0}}; Points[3].Measurements = { - {"x", -0.01, 0.0, ""}, {"y", 1.02, 0.0, ""}, {"z", 1.98, 0.0, ""}}; + {"x", -0.01, 0.0}, {"y", 1.02, 0.0}, {"z", 1.98, 0.0}}; // Cluster around (x=1, y=1, z=2): points {1, 4}. Points[1].Measurements = { - {"x", 1.01, 0.0, ""}, {"y", 1.02, 0.0, ""}, {"z", 1.98, 0.0, ""}}; + {"x", 1.01, 0.0}, {"y", 1.02, 0.0}, {"z", 1.98, 0.0}}; Points[4].Measurements = { - {"x", 0.99, 0.0, ""}, {"y", 1.02, 0.0, ""}, {"z", 1.98, 0.0, ""}}; + {"x", 0.99, 0.0}, {"y", 1.02, 0.0}, {"z", 1.98, 0.0}}; // Cluster around (x=0, y=0, z=0): points {5}, marked as noise. Points[5].Measurements = { - {"x", 0.0, 0.0, ""}, {"y", 0.01, 0.0, ""}, {"z", -0.02, 0.0, ""}}; + {"x", 0.0, 0.0}, {"y", 0.01, 0.0}, {"z", -0.02, 0.0}}; // Error cluster: points {2} Points[2].Error = "oops"; @@ -70,8 +70,8 @@ TEST(ClusteringTest, Clusters3D) { TEST(ClusteringTest, Clusters3D_InvalidSize) { std::vector<InstructionBenchmark> Points(6); Points[0].Measurements = { - {"x", 0.01, 0.0, ""}, {"y", 1.02, 0.0, ""}, {"z", 1.98, 0.0, ""}}; - Points[1].Measurements = {{"y", 1.02, 0.0, ""}, {"z", 1.98, 0.0, ""}}; + {"x", 0.01, 0.0}, {"y", 1.02, 0.0}, {"z", 1.98, 0.0}}; + Points[1].Measurements = {{"y", 1.02, 0.0}, {"z", 1.98, 0.0}}; auto Error = InstructionBenchmarkClustering::create(Points, 2, 0.25).takeError(); ASSERT_TRUE((bool)Error); @@ -80,8 +80,8 @@ TEST(ClusteringTest, Clusters3D_InvalidSize) { TEST(ClusteringTest, Clusters3D_InvalidOrder) { std::vector<InstructionBenchmark> Points(6); - Points[0].Measurements = {{"x", 0.01, 0.0, ""}, {"y", 1.02, 0.0, ""}}; - Points[1].Measurements = {{"y", 1.02, 0.0, ""}, {"x", 1.98, 0.0, ""}}; + Points[0].Measurements = {{"x", 0.01, 0.0}, {"y", 1.02, 0.0}}; + Points[1].Measurements = {{"y", 1.02, 0.0}, {"x", 1.98, 0.0}}; auto Error = InstructionBenchmarkClustering::create(Points, 2, 0.25).takeError(); ASSERT_TRUE((bool)Error); diff --git a/llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp b/llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp index 67e8d2c5bc9..b17ae1caff3 100644 --- a/llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp +++ b/llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp @@ -76,8 +76,8 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) { ToDisk.CpuName = "cpu_name"; ToDisk.LLVMTriple = "llvm_triple"; ToDisk.NumRepetitions = 1; - ToDisk.Measurements.push_back(BenchmarkMeasure{"a", 1, 1, "debug a"}); - ToDisk.Measurements.push_back(BenchmarkMeasure{"b", 2, 2, ""}); + ToDisk.Measurements.push_back(BenchmarkMeasure{"a", 1, 1}); + ToDisk.Measurements.push_back(BenchmarkMeasure{"b", 2, 2}); ToDisk.Error = "error"; ToDisk.Info = "info"; @@ -126,10 +126,10 @@ TEST(BenchmarkResultTest, WriteToAndReadFromDisk) { TEST(BenchmarkResultTest, PerInstructionStats) { PerInstructionStats Stats; - Stats.push(BenchmarkMeasure{"a", 0.5, 0.0, "debug a"}); - Stats.push(BenchmarkMeasure{"a", 1.5, 0.0, "debug a"}); - Stats.push(BenchmarkMeasure{"a", -1.0, 0.0, "debug a"}); - Stats.push(BenchmarkMeasure{"a", 0.0, 0.0, "debug a"}); + Stats.push(BenchmarkMeasure{"a", 0.5, 0.0}); + Stats.push(BenchmarkMeasure{"a", 1.5, 0.0}); + Stats.push(BenchmarkMeasure{"a", -1.0, 0.0}); + Stats.push(BenchmarkMeasure{"a", 0.0, 0.0}); EXPECT_EQ(Stats.min(), -1.0); EXPECT_EQ(Stats.max(), 1.5); EXPECT_EQ(Stats.avg(), 0.25); // (0.5+1.5-1.0+0.0) / 4 |