summaryrefslogtreecommitdiff
path: root/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/main_test.go b/main_test.go
index 9af507e..49f9c13 100644
--- a/main_test.go
+++ b/main_test.go
@@ -2,7 +2,13 @@ package main
import "testing"
-func BenchmarkSilly(b *testing.B) {
+func BenchmarkCPUSilly1(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ _ = i * i
+ }
+}
+
+func BenchmarkCPUSilly2(b *testing.B) {
var sillyResult float64
for i := 0; i < b.N; i++ {
sillyResult += float64(i)