(b *testing.B)
| 96 | } |
| 97 | |
| 98 | func BenchmarkWrappedRecordMagnitude(b *testing.B) { |
| 99 | testRecord.Data = []float32{0, 0, 2} |
| 100 | shouldBe := 2.0 |
| 101 | a := WrapRecord(&testRecord) |
| 102 | |
| 103 | for i := 0; i < b.N; i++ { |
| 104 | if mag := a.Magnitude(); mag != shouldBe { |
| 105 | b.Fatalf("magnitude should be %f, got %f", shouldBe, mag) |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | func BenchmarkWrappedRecordCosine(b *testing.B) { |
| 111 | testRecord.Data = []float32{3, 6, 9} |
nothing calls this directly
no test coverage detected