(b *testing.B)
| 231 | } |
| 232 | |
| 233 | func BenchmarkTokenizer(b *testing.B) { |
| 234 | values := []struct { |
| 235 | scenario string |
| 236 | payload []byte |
| 237 | }{ |
| 238 | { |
| 239 | scenario: "null", |
| 240 | payload: []byte(`null`), |
| 241 | }, |
| 242 | |
| 243 | { |
| 244 | scenario: "true", |
| 245 | payload: []byte(`true`), |
| 246 | }, |
| 247 | |
| 248 | { |
| 249 | scenario: "false", |
| 250 | payload: []byte(`false`), |
| 251 | }, |
| 252 | |
| 253 | { |
| 254 | scenario: "number", |
| 255 | payload: []byte(`-1.23456789`), |
| 256 | }, |
| 257 | |
| 258 | { |
| 259 | scenario: "string", |
| 260 | payload: []byte(`"1234567890"`), |
| 261 | }, |
| 262 | |
| 263 | { |
| 264 | scenario: "object", |
| 265 | payload: []byte(`{ |
| 266 | "timestamp": "2019-01-09T18:59:57.456Z", |
| 267 | "channel": "server", |
| 268 | "type": "track", |
| 269 | "event": "Test", |
| 270 | "userId": "test-user-whatever", |
| 271 | "messageId": "test-message-whatever", |
| 272 | "integrations": { |
| 273 | "whatever": { |
| 274 | "debugMode": false |
| 275 | }, |
| 276 | "myIntegration": { |
| 277 | "debugMode": true |
| 278 | } |
| 279 | }, |
| 280 | "properties": { |
| 281 | "trait1": 1, |
| 282 | "trait2": "test", |
| 283 | "trait3": true |
| 284 | }, |
| 285 | "settings": { |
| 286 | "apiKey": "1234567890", |
| 287 | "debugMode": false, |
| 288 | "directChannels": [ |
| 289 | "server", |
| 290 | "client" |
nothing calls this directly
no test coverage detected
searching dependent graphs…