(b *testing.B)
| 391 | } |
| 392 | |
| 393 | func BenchmarkDeconstruct(b *testing.B) { |
| 394 | meta := backend.BlockMeta{ |
| 395 | DedicatedColumns: test.MakeDedicatedColumns(), |
| 396 | } |
| 397 | |
| 398 | batchCount := 100 |
| 399 | spanCounts := []int{ |
| 400 | 100, 1000, |
| 401 | 10000, |
| 402 | } |
| 403 | |
| 404 | poolSizes := []int{ |
| 405 | 100_000, |
| 406 | 30_000_000, |
| 407 | } |
| 408 | |
| 409 | for _, spanCount := range spanCounts { |
| 410 | for _, poolSize := range poolSizes { |
| 411 | ss := humanize.SI(float64(batchCount*spanCount), "") |
| 412 | ps := humanize.SI(float64(poolSize), "") |
| 413 | b.Run(fmt.Sprintf("SpanCount%v/Pool%v", ss, ps), func(b *testing.B) { |
| 414 | id := test.ValidTraceID(nil) |
| 415 | dbt := test.MakeTraceWithSpanCount(batchCount, spanCount, id) |
| 416 | test.AddDedicatedAttributes(dbt) |
| 417 | |
| 418 | tr, _ := traceToParquet(&meta, id, dbt, nil) |
| 419 | sch := parquet.SchemaOf(tr) |
| 420 | |
| 421 | b.ResetTimer() |
| 422 | |
| 423 | pool := newRowPool(poolSize) |
| 424 | |
| 425 | for i := 0; i < b.N; i++ { |
| 426 | r2 := sch.Deconstruct(pool.Get(), tr) |
| 427 | pool.Put(r2) |
| 428 | } |
| 429 | }) |
| 430 | } |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | func TestParquetRowSizeEstimate(t *testing.T) { |
| 435 | // use this test to parse actual Parquet files and compare the two methods of estimating row size |
nothing calls this directly
no test coverage detected