(attrs []Attribute)
| 315 | } |
| 316 | |
| 317 | func estimateAttrSize(attrs []Attribute) (size int) { |
| 318 | size += len(attrs) * 7 // 7 attribute lvl fields |
| 319 | |
| 320 | // 1 byte for every entry in arrays after the first one. |
| 321 | for _, a := range attrs { |
| 322 | size += max(0, len(a.Value)-1) |
| 323 | size += max(0, len(a.ValueInt)-1) |
| 324 | size += max(0, len(a.ValueDouble)-1) |
| 325 | size += max(0, len(a.ValueBool)-1) |
| 326 | } |
| 327 | |
| 328 | return |
| 329 | } |
| 330 | |
| 331 | func estimateEventsSize(events []Event) (size int) { |
| 332 | for _, e := range events { |
no outgoing calls
no test coverage detected