(b *testing.B)
| 2120 | } |
| 2121 | |
| 2122 | func BenchmarkBinOp(b *testing.B) { |
| 2123 | ops := []struct { |
| 2124 | op BinaryOperation |
| 2125 | }{ |
| 2126 | { |
| 2127 | op: BinaryOperation{ |
| 2128 | Op: OpEqual, |
| 2129 | LHS: NewStaticInt(1), |
| 2130 | RHS: NewStaticInt(1), |
| 2131 | }, |
| 2132 | }, |
| 2133 | { |
| 2134 | op: BinaryOperation{ |
| 2135 | Op: OpEqual, |
| 2136 | LHS: NewStaticFloat(1), |
| 2137 | RHS: NewStaticInt(1), |
| 2138 | }, |
| 2139 | }, |
| 2140 | { |
| 2141 | op: BinaryOperation{ |
| 2142 | Op: OpEqual, |
| 2143 | LHS: NewStaticDuration(1), |
| 2144 | RHS: NewStaticFloat(1), |
| 2145 | }, |
| 2146 | }, |
| 2147 | { |
| 2148 | op: BinaryOperation{ |
| 2149 | Op: OpEqual, |
| 2150 | LHS: NewStaticFloat(1), |
| 2151 | RHS: NewStaticFloat(1), |
| 2152 | }, |
| 2153 | }, |
| 2154 | } |
| 2155 | |
| 2156 | for _, o := range ops { |
| 2157 | b.Run(o.op.String(), func(b *testing.B) { |
| 2158 | for i := 0; i < b.N; i++ { |
| 2159 | _, _ = o.op.execute(&mockSpan{}) |
| 2160 | } |
| 2161 | }) |
| 2162 | } |
| 2163 | } |
| 2164 | |
| 2165 | // BenchmarkUniquespans benchmarks the performance of the uniqueSpans function using |
| 2166 | // different numbers of spansets and spans. |
nothing calls this directly
no test coverage detected