(b *testing.B)
| 108 | } |
| 109 | |
| 110 | func BenchmarkWrappedRecordCosine(b *testing.B) { |
| 111 | testRecord.Data = []float32{3, 6, 9} |
| 112 | a := WrapRecord(&testRecord) |
| 113 | c := WrapRecord(&testRecord) |
| 114 | |
| 115 | for i := 0; i < b.N; i++ { |
| 116 | if cos := a.Cosine(c); cos != 1.0 { |
| 117 | b.Fatalf("cosine similarity should be %f, got %f", 1.0, cos) |
| 118 | } |
| 119 | } |
| 120 | } |
nothing calls this directly
no test coverage detected