Skip to content

Optimize metric label cloning#22406

Open
xudong963 wants to merge 3 commits into
apache:mainfrom
xudong963:optimize-metric-label-clone
Open

Optimize metric label cloning#22406
xudong963 wants to merge 3 commits into
apache:mainfrom
xudong963:optimize-metric-label-clone

Conversation

@xudong963
Copy link
Copy Markdown
Member

@xudong963 xudong963 commented May 21, 2026

Which issue does this PR close?

Rationale for this change

ParquetFileMetrics::new registers many per-file metrics with the same filename label. Before this PR, each metric built its own owned filename label with filename.to_string(), which repeatedly copied the same dynamic
string during parquet scan setup.

This PR keeps parquet metrics eagerly registered, so ExecutionPlan::metrics() visibility during execution is unchanged, while reducing repeated label string allocation and copying.

What changes are included in this PR?

  • Store owned Label name/value strings behind Arc<str> internally, while
    keeping borrowed static label strings allocation-free.
  • Reuse one cloned filename label across the per-file parquet metrics in
    ParquetFileMetrics::new.
  • Add a metrics test confirming borrowed and owned label values remain equal
    and display the same way.

Are these changes tested?

Yes.

Are there any user-facing changes?

No. Metric registration timing and displayed label values are unchanged.

@github-actions github-actions Bot added physical-expr Changes to the physical-expr crates datasource Changes to the datasource crate labels May 21, 2026
@xudong963
Copy link
Copy Markdown
Member Author

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4504384043-249-vwdnf 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing optimize-metric-label-clone (e049019) to c8b784a (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4504384043-248-r8pl8 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing optimize-metric-label-clone (e049019) to c8b784a (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4504384043-250-6tcfd 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing optimize-metric-label-clone (e049019) to c8b784a (merge-base) diff using: tpch
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃    optimize-metric-label-clone ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 38.58 / 39.73 ±1.47 / 42.56 ms │ 38.24 / 38.94 ±1.07 / 41.07 ms │ no change │
│ QQuery 2  │ 20.75 / 21.15 ±0.64 / 22.41 ms │ 20.32 / 20.55 ±0.28 / 21.10 ms │ no change │
│ QQuery 3  │ 35.38 / 35.96 ±0.83 / 37.61 ms │ 33.38 / 35.27 ±0.98 / 36.14 ms │ no change │
│ QQuery 4  │ 17.40 / 17.62 ±0.16 / 17.79 ms │ 17.24 / 17.92 ±0.67 / 18.97 ms │ no change │
│ QQuery 5  │ 42.46 / 43.40 ±1.05 / 45.45 ms │ 39.63 / 42.73 ±1.86 / 45.44 ms │ no change │
│ QQuery 6  │ 16.35 / 16.64 ±0.17 / 16.84 ms │ 16.00 / 16.50 ±0.52 / 17.48 ms │ no change │
│ QQuery 7  │ 46.47 / 47.90 ±1.18 / 49.86 ms │ 46.37 / 48.92 ±1.53 / 50.85 ms │ no change │
│ QQuery 8  │ 45.14 / 45.84 ±0.93 / 47.66 ms │ 45.08 / 45.17 ±0.08 / 45.29 ms │ no change │
│ QQuery 9  │ 49.81 / 50.90 ±1.11 / 52.96 ms │ 49.51 / 51.08 ±1.41 / 53.58 ms │ no change │
│ QQuery 10 │ 63.73 / 64.11 ±0.34 / 64.72 ms │ 63.46 / 63.62 ±0.10 / 63.73 ms │ no change │
│ QQuery 11 │ 13.34 / 13.53 ±0.21 / 13.90 ms │ 13.46 / 13.82 ±0.41 / 14.55 ms │ no change │
│ QQuery 12 │ 24.05 / 24.60 ±0.36 / 25.08 ms │ 24.15 / 24.79 ±0.55 / 25.78 ms │ no change │
│ QQuery 13 │ 32.97 / 36.22 ±2.48 / 40.13 ms │ 33.25 / 34.78 ±0.93 / 35.96 ms │ no change │
│ QQuery 14 │ 25.55 / 25.76 ±0.18 / 26.02 ms │ 25.59 / 25.74 ±0.16 / 25.98 ms │ no change │
│ QQuery 15 │ 31.53 / 31.66 ±0.12 / 31.83 ms │ 31.38 / 32.01 ±0.96 / 33.93 ms │ no change │
│ QQuery 16 │ 14.90 / 15.12 ±0.18 / 15.41 ms │ 14.86 / 15.14 ±0.26 / 15.62 ms │ no change │
│ QQuery 17 │ 75.18 / 76.82 ±1.03 / 78.09 ms │ 75.04 / 75.25 ±0.23 / 75.67 ms │ no change │
│ QQuery 18 │ 61.30 / 63.01 ±0.86 / 63.70 ms │ 62.48 / 63.60 ±0.91 / 64.82 ms │ no change │
│ QQuery 19 │ 35.45 / 36.03 ±0.73 / 37.40 ms │ 35.19 / 35.66 ±0.37 / 36.26 ms │ no change │
│ QQuery 20 │ 37.79 / 38.22 ±0.45 / 39.09 ms │ 37.72 / 38.64 ±0.54 / 39.30 ms │ no change │
│ QQuery 21 │ 56.97 / 58.59 ±1.27 / 60.10 ms │ 57.30 / 58.23 ±0.60 / 59.09 ms │ no change │
│ QQuery 22 │ 23.22 / 23.92 ±0.56 / 24.84 ms │ 23.10 / 24.66 ±2.12 / 28.81 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                          ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 826.73ms │
│ Total Time (optimize-metric-label-clone)   │ 822.99ms │
│ Average Time (HEAD)                        │  37.58ms │
│ Average Time (optimize-metric-label-clone) │  37.41ms │
│ Queries Faster                             │        0 │
│ Queries Slower                             │        0 │
│ Queries with No Change                     │       22 │
│ Queries with Failure                       │        0 │
└────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 5.5 GiB
Avg memory 5.1 GiB
CPU user 29.7s
CPU sys 2.2s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 5.4 GiB
Avg memory 5.0 GiB
CPU user 29.7s
CPU sys 2.2s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃           optimize-metric-label-clone ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           6.40 / 7.06 ±1.05 / 9.16 ms │           6.60 / 7.09 ±0.82 / 8.71 ms │     no change │
│ QQuery 2  │        82.96 / 83.40 ±0.43 / 84.16 ms │        82.67 / 82.91 ±0.22 / 83.21 ms │     no change │
│ QQuery 3  │        29.95 / 30.22 ±0.22 / 30.58 ms │        29.87 / 30.19 ±0.32 / 30.70 ms │     no change │
│ QQuery 4  │     543.36 / 546.36 ±1.52 / 547.36 ms │     544.98 / 547.39 ±1.62 / 548.80 ms │     no change │
│ QQuery 5  │        53.50 / 54.04 ±0.44 / 54.83 ms │        53.54 / 54.18 ±0.59 / 55.27 ms │     no change │
│ QQuery 6  │        36.60 / 37.06 ±0.33 / 37.59 ms │        36.61 / 36.89 ±0.20 / 37.13 ms │     no change │
│ QQuery 7  │     110.34 / 111.68 ±0.95 / 113.06 ms │     109.84 / 110.74 ±0.97 / 112.34 ms │     no change │
│ QQuery 8  │        40.06 / 40.32 ±0.22 / 40.60 ms │        39.87 / 39.94 ±0.08 / 40.08 ms │     no change │
│ QQuery 9  │        55.32 / 56.77 ±1.37 / 58.86 ms │        54.04 / 55.16 ±1.32 / 57.68 ms │     no change │
│ QQuery 10 │        83.49 / 85.12 ±1.64 / 88.06 ms │        81.86 / 83.52 ±1.97 / 87.21 ms │     no change │
│ QQuery 11 │     340.48 / 344.93 ±3.49 / 350.26 ms │     342.39 / 345.95 ±2.30 / 348.97 ms │     no change │
│ QQuery 12 │        29.53 / 30.12 ±0.52 / 30.92 ms │        30.20 / 30.61 ±0.50 / 31.57 ms │     no change │
│ QQuery 13 │     131.03 / 131.50 ±0.36 / 132.11 ms │     130.39 / 131.48 ±0.77 / 132.42 ms │     no change │
│ QQuery 14 │     517.81 / 520.15 ±2.07 / 523.87 ms │     512.44 / 515.04 ±2.52 / 519.31 ms │     no change │
│ QQuery 15 │        63.73 / 64.59 ±0.69 / 65.57 ms │        63.60 / 64.64 ±0.56 / 65.15 ms │     no change │
│ QQuery 16 │           7.07 / 7.30 ±0.31 / 7.93 ms │           7.05 / 7.38 ±0.22 / 7.68 ms │     no change │
│ QQuery 17 │        82.61 / 83.58 ±0.89 / 84.82 ms │        82.87 / 83.19 ±0.32 / 83.77 ms │     no change │
│ QQuery 18 │     153.53 / 154.73 ±0.71 / 155.74 ms │     153.40 / 154.51 ±1.10 / 156.45 ms │     no change │
│ QQuery 19 │        42.52 / 42.89 ±0.25 / 43.29 ms │        42.54 / 43.05 ±0.68 / 44.37 ms │     no change │
│ QQuery 20 │        36.73 / 37.37 ±0.37 / 37.76 ms │        35.77 / 36.47 ±0.57 / 37.32 ms │     no change │
│ QQuery 21 │        18.65 / 19.09 ±0.41 / 19.85 ms │        18.64 / 18.89 ±0.20 / 19.25 ms │     no change │
│ QQuery 22 │        63.58 / 64.48 ±0.58 / 65.19 ms │        63.65 / 65.26 ±1.55 / 68.11 ms │     no change │
│ QQuery 23 │     495.51 / 497.52 ±1.65 / 499.46 ms │     492.89 / 496.54 ±4.32 / 504.73 ms │     no change │
│ QQuery 24 │     240.35 / 243.03 ±2.89 / 248.47 ms │     236.85 / 238.91 ±2.47 / 243.74 ms │     no change │
│ QQuery 25 │     115.91 / 116.46 ±0.41 / 117.12 ms │     114.89 / 116.11 ±1.25 / 117.93 ms │     no change │
│ QQuery 26 │        73.00 / 74.16 ±1.19 / 76.39 ms │        72.02 / 73.51 ±1.27 / 75.83 ms │     no change │
│ QQuery 27 │           7.31 / 7.50 ±0.19 / 7.86 ms │           7.27 / 7.43 ±0.15 / 7.69 ms │     no change │
│ QQuery 28 │        63.48 / 64.41 ±0.76 / 65.81 ms │        59.88 / 63.45 ±2.40 / 67.39 ms │     no change │
│ QQuery 29 │      99.95 / 101.13 ±0.78 / 102.14 ms │      99.62 / 100.30 ±0.83 / 101.93 ms │     no change │
│ QQuery 30 │        32.06 / 32.56 ±0.44 / 33.14 ms │        31.25 / 31.68 ±0.31 / 32.22 ms │     no change │
│ QQuery 31 │     115.12 / 116.32 ±0.79 / 117.60 ms │     114.52 / 115.77 ±1.41 / 118.50 ms │     no change │
│ QQuery 32 │        21.76 / 22.38 ±0.93 / 24.23 ms │        21.44 / 22.27 ±1.03 / 24.31 ms │     no change │
│ QQuery 33 │        40.55 / 40.76 ±0.20 / 41.07 ms │        40.10 / 40.24 ±0.14 / 40.51 ms │     no change │
│ QQuery 34 │        10.17 / 10.59 ±0.39 / 11.27 ms │         9.99 / 10.25 ±0.22 / 10.60 ms │     no change │
│ QQuery 35 │        83.42 / 83.80 ±0.45 / 84.52 ms │        81.80 / 82.38 ±0.46 / 83.18 ms │     no change │
│ QQuery 36 │           6.65 / 6.78 ±0.20 / 7.17 ms │           6.70 / 6.85 ±0.17 / 7.18 ms │     no change │
│ QQuery 37 │           7.42 / 7.56 ±0.11 / 7.71 ms │           7.45 / 7.50 ±0.03 / 7.54 ms │     no change │
│ QQuery 38 │        70.90 / 71.77 ±0.73 / 72.86 ms │        69.80 / 70.35 ±0.55 / 71.34 ms │     no change │
│ QQuery 39 │     102.90 / 105.00 ±1.50 / 107.49 ms │     101.98 / 103.27 ±1.32 / 105.77 ms │     no change │
│ QQuery 40 │        24.08 / 24.50 ±0.35 / 25.14 ms │        23.85 / 24.24 ±0.31 / 24.51 ms │     no change │
│ QQuery 41 │        14.56 / 14.80 ±0.24 / 15.21 ms │        14.97 / 15.12 ±0.16 / 15.40 ms │     no change │
│ QQuery 42 │        24.79 / 25.25 ±0.36 / 25.79 ms │        24.72 / 24.93 ±0.14 / 25.11 ms │     no change │
│ QQuery 43 │           5.46 / 5.58 ±0.15 / 5.87 ms │           5.42 / 5.55 ±0.14 / 5.82 ms │     no change │
│ QQuery 44 │        11.39 / 11.74 ±0.29 / 12.21 ms │        11.35 / 11.87 ±0.63 / 13.10 ms │     no change │
│ QQuery 45 │        42.52 / 44.40 ±1.14 / 45.42 ms │        41.55 / 42.95 ±0.79 / 43.77 ms │     no change │
│ QQuery 46 │        14.19 / 14.85 ±0.58 / 15.76 ms │        13.86 / 14.23 ±0.46 / 15.12 ms │     no change │
│ QQuery 47 │     247.23 / 249.85 ±3.40 / 256.55 ms │     241.85 / 245.01 ±2.80 / 250.11 ms │     no change │
│ QQuery 48 │     106.18 / 106.87 ±0.84 / 108.47 ms │     105.01 / 106.00 ±1.21 / 108.34 ms │     no change │
│ QQuery 49 │        82.82 / 83.82 ±0.98 / 85.62 ms │        82.54 / 83.33 ±0.50 / 84.11 ms │     no change │
│ QQuery 50 │        61.52 / 61.77 ±0.22 / 62.07 ms │        60.74 / 61.49 ±0.64 / 62.61 ms │     no change │
│ QQuery 51 │        95.26 / 96.33 ±0.93 / 97.80 ms │       92.13 / 96.32 ±4.10 / 103.86 ms │     no change │
│ QQuery 52 │        25.42 / 25.65 ±0.20 / 25.93 ms │        25.19 / 25.36 ±0.16 / 25.65 ms │     no change │
│ QQuery 53 │        31.69 / 31.75 ±0.05 / 31.83 ms │        31.33 / 31.62 ±0.16 / 31.78 ms │     no change │
│ QQuery 54 │        56.26 / 56.78 ±0.53 / 57.75 ms │        56.37 / 56.95 ±0.55 / 57.94 ms │     no change │
│ QQuery 55 │        24.69 / 24.85 ±0.10 / 25.00 ms │        23.98 / 24.40 ±0.23 / 24.64 ms │     no change │
│ QQuery 56 │        41.44 / 41.63 ±0.15 / 41.82 ms │        41.04 / 41.91 ±1.00 / 43.69 ms │     no change │
│ QQuery 57 │     181.96 / 185.18 ±1.79 / 187.21 ms │     179.18 / 180.86 ±1.36 / 183.33 ms │     no change │
│ QQuery 58 │     119.98 / 121.46 ±0.98 / 123.01 ms │     118.61 / 119.84 ±0.65 / 120.47 ms │     no change │
│ QQuery 59 │     120.37 / 121.33 ±0.72 / 122.53 ms │     118.69 / 120.34 ±1.04 / 121.84 ms │     no change │
│ QQuery 60 │        41.13 / 41.67 ±0.47 / 42.39 ms │        40.90 / 41.33 ±0.28 / 41.73 ms │     no change │
│ QQuery 61 │        14.46 / 14.67 ±0.12 / 14.81 ms │        14.12 / 14.23 ±0.09 / 14.35 ms │     no change │
│ QQuery 62 │        48.09 / 48.34 ±0.22 / 48.69 ms │        47.72 / 47.84 ±0.10 / 47.99 ms │     no change │
│ QQuery 63 │        31.59 / 32.42 ±0.65 / 33.53 ms │        31.52 / 31.71 ±0.13 / 31.89 ms │     no change │
│ QQuery 64 │     471.81 / 476.27 ±4.58 / 484.18 ms │     465.51 / 474.43 ±7.96 / 486.28 ms │     no change │
│ QQuery 65 │     145.36 / 149.66 ±2.50 / 153.17 ms │     143.88 / 147.73 ±2.14 / 150.13 ms │     no change │
│ QQuery 66 │        84.85 / 88.11 ±4.00 / 95.96 ms │        83.97 / 84.64 ±0.57 / 85.59 ms │     no change │
│ QQuery 67 │     259.70 / 264.00 ±2.68 / 266.57 ms │     260.21 / 263.15 ±2.57 / 266.25 ms │     no change │
│ QQuery 68 │        14.24 / 14.80 ±0.55 / 15.68 ms │        14.19 / 14.38 ±0.11 / 14.50 ms │     no change │
│ QQuery 69 │        79.06 / 80.21 ±1.43 / 83.01 ms │        78.18 / 80.52 ±4.39 / 89.28 ms │     no change │
│ QQuery 70 │     108.17 / 110.67 ±1.71 / 112.69 ms │     106.80 / 110.08 ±5.38 / 120.78 ms │     no change │
│ QQuery 71 │        36.87 / 37.75 ±1.27 / 40.24 ms │        36.72 / 36.92 ±0.17 / 37.15 ms │     no change │
│ QQuery 72 │ 2118.96 / 2195.71 ±57.93 / 2289.46 ms │ 2132.66 / 2210.46 ±61.37 / 2290.98 ms │     no change │
│ QQuery 73 │        10.20 / 10.44 ±0.25 / 10.79 ms │         9.82 / 10.05 ±0.16 / 10.29 ms │     no change │
│ QQuery 74 │     193.36 / 196.51 ±3.08 / 201.90 ms │     190.96 / 195.97 ±6.49 / 208.74 ms │     no change │
│ QQuery 75 │     152.48 / 155.27 ±3.23 / 161.52 ms │     150.02 / 152.28 ±2.42 / 156.79 ms │     no change │
│ QQuery 76 │        36.93 / 38.60 ±2.18 / 42.89 ms │        36.48 / 36.60 ±0.09 / 36.74 ms │ +1.05x faster │
│ QQuery 77 │        64.44 / 65.33 ±1.33 / 67.97 ms │        62.50 / 64.20 ±1.68 / 67.42 ms │     no change │
│ QQuery 78 │     196.33 / 197.79 ±1.67 / 200.96 ms │     193.66 / 195.50 ±1.70 / 197.63 ms │     no change │
│ QQuery 79 │        69.45 / 69.72 ±0.23 / 70.04 ms │        68.72 / 69.03 ±0.33 / 69.51 ms │     no change │
│ QQuery 80 │     103.56 / 105.91 ±2.63 / 110.77 ms │     103.17 / 104.87 ±2.62 / 110.04 ms │     no change │
│ QQuery 81 │        25.91 / 26.97 ±1.80 / 30.56 ms │        25.36 / 25.81 ±0.24 / 26.05 ms │     no change │
│ QQuery 82 │        17.91 / 18.47 ±0.51 / 19.44 ms │        17.34 / 17.58 ±0.18 / 17.77 ms │     no change │
│ QQuery 83 │        39.32 / 39.52 ±0.16 / 39.75 ms │        38.63 / 38.85 ±0.15 / 39.04 ms │     no change │
│ QQuery 84 │        44.48 / 44.86 ±0.23 / 45.16 ms │        44.18 / 44.49 ±0.25 / 44.92 ms │     no change │
│ QQuery 85 │     141.07 / 143.19 ±1.90 / 145.50 ms │     138.34 / 140.26 ±2.19 / 144.51 ms │     no change │
│ QQuery 86 │        26.17 / 26.71 ±0.42 / 27.24 ms │        26.09 / 26.23 ±0.18 / 26.58 ms │     no change │
│ QQuery 87 │        71.54 / 72.74 ±0.90 / 74.02 ms │        70.18 / 71.00 ±0.54 / 71.54 ms │     no change │
│ QQuery 88 │        66.96 / 67.22 ±0.21 / 67.50 ms │        65.86 / 66.18 ±0.51 / 67.20 ms │     no change │
│ QQuery 89 │        37.72 / 38.03 ±0.36 / 38.74 ms │        37.37 / 37.75 ±0.37 / 38.42 ms │     no change │
│ QQuery 90 │        18.26 / 18.47 ±0.14 / 18.63 ms │        18.19 / 18.35 ±0.15 / 18.62 ms │     no change │
│ QQuery 91 │        53.85 / 54.17 ±0.28 / 54.66 ms │        53.01 / 53.42 ±0.40 / 54.20 ms │     no change │
│ QQuery 92 │        31.12 / 31.46 ±0.29 / 31.95 ms │        30.63 / 30.92 ±0.26 / 31.40 ms │     no change │
│ QQuery 93 │        51.04 / 51.96 ±0.72 / 52.94 ms │        50.65 / 52.15 ±1.22 / 53.80 ms │     no change │
│ QQuery 94 │        38.76 / 39.33 ±0.47 / 40.18 ms │        39.23 / 40.05 ±0.67 / 40.96 ms │     no change │
│ QQuery 95 │        85.88 / 87.05 ±0.66 / 87.87 ms │        85.64 / 86.65 ±0.65 / 87.48 ms │     no change │
│ QQuery 96 │        25.09 / 25.34 ±0.22 / 25.67 ms │        25.29 / 26.06 ±1.16 / 28.37 ms │     no change │
│ QQuery 97 │        47.00 / 47.30 ±0.28 / 47.83 ms │        47.17 / 47.66 ±0.35 / 48.19 ms │     no change │
│ QQuery 98 │        43.88 / 44.24 ±0.28 / 44.68 ms │        43.75 / 44.16 ±0.29 / 44.59 ms │     no change │
│ QQuery 99 │        71.20 / 72.18 ±1.04 / 74.18 ms │        71.02 / 71.30 ±0.32 / 71.90 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 10845.93ms │
│ Total Time (optimize-metric-label-clone)   │ 10788.39ms │
│ Average Time (HEAD)                        │   109.55ms │
│ Average Time (optimize-metric-label-clone) │   108.97ms │
│ Queries Faster                             │          1 │
│ Queries Slower                             │          0 │
│ Queries with No Change                     │         98 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 7.0 GiB
Avg memory 6.3 GiB
CPU user 238.6s
CPU sys 5.8s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 6.7 GiB
Avg memory 6.0 GiB
CPU user 240.4s
CPU sys 5.9s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                   HEAD ┃           optimize-metric-label-clone ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.25 / 4.88 ±7.10 / 19.08 ms │          1.24 / 4.74 ±6.85 / 18.44 ms │     no change │
│ QQuery 1  │         12.72 / 13.19 ±0.27 / 13.54 ms │        12.41 / 12.59 ±0.12 / 12.79 ms │     no change │
│ QQuery 2  │         36.05 / 36.35 ±0.29 / 36.76 ms │        35.26 / 35.49 ±0.20 / 35.77 ms │     no change │
│ QQuery 3  │         30.56 / 31.21 ±0.56 / 32.26 ms │        30.05 / 30.67 ±0.40 / 31.15 ms │     no change │
│ QQuery 4  │      227.42 / 230.90 ±2.03 / 232.73 ms │     222.91 / 226.11 ±2.73 / 229.55 ms │     no change │
│ QQuery 5  │      282.95 / 291.43 ±5.71 / 299.55 ms │     269.88 / 272.91 ±1.95 / 275.02 ms │ +1.07x faster │
│ QQuery 6  │            1.31 / 1.45 ±0.21 / 1.87 ms │           1.30 / 1.44 ±0.21 / 1.85 ms │     no change │
│ QQuery 7  │         14.49 / 14.72 ±0.20 / 15.06 ms │        13.24 / 13.41 ±0.11 / 13.52 ms │ +1.10x faster │
│ QQuery 8  │      353.72 / 358.26 ±3.25 / 363.10 ms │     316.77 / 322.80 ±4.98 / 330.69 ms │ +1.11x faster │
│ QQuery 9  │     504.80 / 525.83 ±16.69 / 550.95 ms │     453.11 / 461.08 ±6.06 / 468.47 ms │ +1.14x faster │
│ QQuery 10 │         74.89 / 75.79 ±0.59 / 76.70 ms │        67.44 / 68.56 ±0.93 / 69.97 ms │ +1.11x faster │
│ QQuery 11 │         85.71 / 88.28 ±1.49 / 90.21 ms │        79.50 / 85.36 ±7.18 / 98.84 ms │     no change │
│ QQuery 12 │      302.66 / 313.37 ±9.02 / 326.65 ms │     264.62 / 268.11 ±3.82 / 274.21 ms │ +1.17x faster │
│ QQuery 13 │     395.13 / 410.33 ±10.08 / 422.76 ms │    362.85 / 379.92 ±18.18 / 412.54 ms │ +1.08x faster │
│ QQuery 14 │      297.13 / 306.98 ±5.39 / 311.50 ms │     278.44 / 284.32 ±8.03 / 299.70 ms │ +1.08x faster │
│ QQuery 15 │      279.03 / 290.90 ±7.09 / 298.52 ms │    262.63 / 276.79 ±13.07 / 294.05 ms │     no change │
│ QQuery 16 │      643.31 / 658.86 ±9.23 / 670.52 ms │     606.35 / 618.16 ±9.99 / 634.22 ms │ +1.07x faster │
│ QQuery 17 │      619.64 / 626.45 ±3.58 / 629.18 ms │     607.94 / 622.64 ±9.62 / 638.01 ms │     no change │
│ QQuery 18 │  1277.23 / 1309.21 ±24.11 / 1339.36 ms │ 1236.62 / 1268.49 ±23.29 / 1298.67 ms │     no change │
│ QQuery 19 │         28.38 / 33.27 ±5.80 / 42.04 ms │        27.17 / 30.62 ±6.22 / 43.03 ms │ +1.09x faster │
│ QQuery 20 │     540.87 / 552.94 ±17.26 / 587.01 ms │     512.30 / 518.43 ±6.56 / 530.92 ms │ +1.07x faster │
│ QQuery 21 │     631.41 / 668.91 ±24.18 / 698.39 ms │     590.60 / 596.31 ±3.09 / 599.34 ms │ +1.12x faster │
│ QQuery 22 │  1090.23 / 1163.35 ±48.21 / 1216.81 ms │ 1049.01 / 1062.04 ±14.23 / 1086.27 ms │ +1.10x faster │
│ QQuery 23 │  3170.41 / 3242.28 ±74.02 / 3371.65 ms │ 3153.57 / 3177.24 ±20.39 / 3211.35 ms │     no change │
│ QQuery 24 │         41.69 / 42.28 ±0.78 / 43.77 ms │        41.72 / 46.02 ±4.86 / 54.71 ms │  1.09x slower │
│ QQuery 25 │      111.63 / 114.54 ±2.86 / 119.78 ms │     110.56 / 112.35 ±0.95 / 113.40 ms │     no change │
│ QQuery 26 │         42.14 / 46.10 ±4.95 / 55.41 ms │        42.27 / 43.81 ±1.95 / 47.48 ms │     no change │
│ QQuery 27 │      664.33 / 675.94 ±8.66 / 691.28 ms │     666.57 / 680.76 ±8.10 / 688.32 ms │     no change │
│ QQuery 28 │ 3028.56 / 3214.93 ±169.71 / 3421.29 ms │ 3022.95 / 3039.02 ±15.83 / 3069.37 ms │ +1.06x faster │
│ QQuery 29 │        45.27 / 51.26 ±10.61 / 72.47 ms │        41.32 / 48.36 ±5.12 / 54.61 ms │ +1.06x faster │
│ QQuery 30 │     313.84 / 339.16 ±31.47 / 398.98 ms │     295.28 / 306.27 ±9.20 / 323.23 ms │ +1.11x faster │
│ QQuery 31 │     293.78 / 310.80 ±16.66 / 339.43 ms │     279.12 / 285.27 ±6.67 / 298.12 ms │ +1.09x faster │
│ QQuery 32 │    927.95 / 977.48 ±33.70 / 1016.01 ms │   939.54 / 963.27 ±25.79 / 1012.67 ms │     no change │
│ QQuery 33 │  1445.41 / 1454.09 ±11.45 / 1475.87 ms │ 1453.82 / 1482.26 ±18.84 / 1503.58 ms │     no change │
│ QQuery 34 │  1433.66 / 1474.45 ±28.90 / 1508.60 ms │ 1459.84 / 1478.18 ±12.08 / 1495.87 ms │     no change │
│ QQuery 35 │      282.32 / 285.97 ±3.37 / 292.26 ms │     297.44 / 306.43 ±8.38 / 320.56 ms │  1.07x slower │
│ QQuery 36 │         68.57 / 78.19 ±7.80 / 92.35 ms │        66.89 / 70.39 ±4.74 / 79.58 ms │ +1.11x faster │
│ QQuery 37 │         36.22 / 40.35 ±4.89 / 48.98 ms │        36.08 / 37.56 ±2.12 / 41.72 ms │ +1.07x faster │
│ QQuery 38 │         44.43 / 45.82 ±1.62 / 48.97 ms │        40.47 / 45.41 ±7.69 / 60.73 ms │     no change │
│ QQuery 39 │      144.07 / 149.52 ±3.05 / 152.79 ms │     142.12 / 150.57 ±7.21 / 162.31 ms │     no change │
│ QQuery 40 │         14.34 / 15.46 ±1.39 / 18.14 ms │        14.26 / 14.55 ±0.15 / 14.71 ms │ +1.06x faster │
│ QQuery 41 │         13.97 / 14.21 ±0.26 / 14.71 ms │        14.12 / 14.27 ±0.12 / 14.40 ms │     no change │
│ QQuery 42 │         13.36 / 15.74 ±3.62 / 22.95 ms │        13.30 / 13.54 ±0.15 / 13.74 ms │ +1.16x faster │
└───────────┴────────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 20595.44ms │
│ Total Time (optimize-metric-label-clone)   │ 19776.53ms │
│ Average Time (HEAD)                        │   478.96ms │
│ Average Time (optimize-metric-label-clone) │   459.92ms │
│ Queries Faster                             │         21 │
│ Queries Slower                             │          2 │
│ Queries with No Change                     │         20 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 30.2 GiB
Avg memory 22.8 GiB
CPU user 1069.6s
CPU sys 69.3s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 30.7 GiB
Avg memory 23.5 GiB
CPU user 1030.9s
CPU sys 62.1s
Peak spill 0 B

File an issue against this benchmark runner

@xudong963
Copy link
Copy Markdown
Member Author

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                   HEAD ┃           optimize-metric-label-clone ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │           1.25 / 4.88 ±7.10 / 19.08 ms │          1.24 / 4.74 ±6.85 / 18.44 ms │     no change │
│ QQuery 1  │         12.72 / 13.19 ±0.27 / 13.54 ms │        12.41 / 12.59 ±0.12 / 12.79 ms │     no change │
│ QQuery 2  │         36.05 / 36.35 ±0.29 / 36.76 ms │        35.26 / 35.49 ±0.20 / 35.77 ms │     no change │
│ QQuery 3  │         30.56 / 31.21 ±0.56 / 32.26 ms │        30.05 / 30.67 ±0.40 / 31.15 ms │     no change │
│ QQuery 4  │      227.42 / 230.90 ±2.03 / 232.73 ms │     222.91 / 226.11 ±2.73 / 229.55 ms │     no change │
│ QQuery 5  │      282.95 / 291.43 ±5.71 / 299.55 ms │     269.88 / 272.91 ±1.95 / 275.02 ms │ +1.07x faster │
│ QQuery 6  │            1.31 / 1.45 ±0.21 / 1.87 ms │           1.30 / 1.44 ±0.21 / 1.85 ms │     no change │
│ QQuery 7  │         14.49 / 14.72 ±0.20 / 15.06 ms │        13.24 / 13.41 ±0.11 / 13.52 ms │ +1.10x faster │
│ QQuery 8  │      353.72 / 358.26 ±3.25 / 363.10 ms │     316.77 / 322.80 ±4.98 / 330.69 ms │ +1.11x faster │
│ QQuery 9  │     504.80 / 525.83 ±16.69 / 550.95 ms │     453.11 / 461.08 ±6.06 / 468.47 ms │ +1.14x faster │
│ QQuery 10 │         74.89 / 75.79 ±0.59 / 76.70 ms │        67.44 / 68.56 ±0.93 / 69.97 ms │ +1.11x faster │
│ QQuery 11 │         85.71 / 88.28 ±1.49 / 90.21 ms │        79.50 / 85.36 ±7.18 / 98.84 ms │     no change │
│ QQuery 12 │      302.66 / 313.37 ±9.02 / 326.65 ms │     264.62 / 268.11 ±3.82 / 274.21 ms │ +1.17x faster │
│ QQuery 13 │     395.13 / 410.33 ±10.08 / 422.76 ms │    362.85 / 379.92 ±18.18 / 412.54 ms │ +1.08x faster │
│ QQuery 14 │      297.13 / 306.98 ±5.39 / 311.50 ms │     278.44 / 284.32 ±8.03 / 299.70 ms │ +1.08x faster │
│ QQuery 15 │      279.03 / 290.90 ±7.09 / 298.52 ms │    262.63 / 276.79 ±13.07 / 294.05 ms │     no change │
│ QQuery 16 │      643.31 / 658.86 ±9.23 / 670.52 ms │     606.35 / 618.16 ±9.99 / 634.22 ms │ +1.07x faster │
│ QQuery 17 │      619.64 / 626.45 ±3.58 / 629.18 ms │     607.94 / 622.64 ±9.62 / 638.01 ms │     no change │
│ QQuery 18 │  1277.23 / 1309.21 ±24.11 / 1339.36 ms │ 1236.62 / 1268.49 ±23.29 / 1298.67 ms │     no change │
│ QQuery 19 │         28.38 / 33.27 ±5.80 / 42.04 ms │        27.17 / 30.62 ±6.22 / 43.03 ms │ +1.09x faster │
│ QQuery 20 │     540.87 / 552.94 ±17.26 / 587.01 ms │     512.30 / 518.43 ±6.56 / 530.92 ms │ +1.07x faster │
│ QQuery 21 │     631.41 / 668.91 ±24.18 / 698.39 ms │     590.60 / 596.31 ±3.09 / 599.34 ms │ +1.12x faster │
│ QQuery 22 │  1090.23 / 1163.35 ±48.21 / 1216.81 ms │ 1049.01 / 1062.04 ±14.23 / 1086.27 ms │ +1.10x faster │
│ QQuery 23 │  3170.41 / 3242.28 ±74.02 / 3371.65 ms │ 3153.57 / 3177.24 ±20.39 / 3211.35 ms │     no change │
│ QQuery 24 │         41.69 / 42.28 ±0.78 / 43.77 ms │        41.72 / 46.02 ±4.86 / 54.71 ms │  1.09x slower │
│ QQuery 25 │      111.63 / 114.54 ±2.86 / 119.78 ms │     110.56 / 112.35 ±0.95 / 113.40 ms │     no change │
│ QQuery 26 │         42.14 / 46.10 ±4.95 / 55.41 ms │        42.27 / 43.81 ±1.95 / 47.48 ms │     no change │
│ QQuery 27 │      664.33 / 675.94 ±8.66 / 691.28 ms │     666.57 / 680.76 ±8.10 / 688.32 ms │     no change │
│ QQuery 28 │ 3028.56 / 3214.93 ±169.71 / 3421.29 ms │ 3022.95 / 3039.02 ±15.83 / 3069.37 ms │ +1.06x faster │
│ QQuery 29 │        45.27 / 51.26 ±10.61 / 72.47 ms │        41.32 / 48.36 ±5.12 / 54.61 ms │ +1.06x faster │
│ QQuery 30 │     313.84 / 339.16 ±31.47 / 398.98 ms │     295.28 / 306.27 ±9.20 / 323.23 ms │ +1.11x faster │
│ QQuery 31 │     293.78 / 310.80 ±16.66 / 339.43 ms │     279.12 / 285.27 ±6.67 / 298.12 ms │ +1.09x faster │
│ QQuery 32 │    927.95 / 977.48 ±33.70 / 1016.01 ms │   939.54 / 963.27 ±25.79 / 1012.67 ms │     no change │
│ QQuery 33 │  1445.41 / 1454.09 ±11.45 / 1475.87 ms │ 1453.82 / 1482.26 ±18.84 / 1503.58 ms │     no change │
│ QQuery 34 │  1433.66 / 1474.45 ±28.90 / 1508.60 ms │ 1459.84 / 1478.18 ±12.08 / 1495.87 ms │     no change │
│ QQuery 35 │      282.32 / 285.97 ±3.37 / 292.26 ms │     297.44 / 306.43 ±8.38 / 320.56 ms │  1.07x slower │
│ QQuery 36 │         68.57 / 78.19 ±7.80 / 92.35 ms │        66.89 / 70.39 ±4.74 / 79.58 ms │ +1.11x faster │
│ QQuery 37 │         36.22 / 40.35 ±4.89 / 48.98 ms │        36.08 / 37.56 ±2.12 / 41.72 ms │ +1.07x faster │
│ QQuery 38 │         44.43 / 45.82 ±1.62 / 48.97 ms │        40.47 / 45.41 ±7.69 / 60.73 ms │     no change │
│ QQuery 39 │      144.07 / 149.52 ±3.05 / 152.79 ms │     142.12 / 150.57 ±7.21 / 162.31 ms │     no change │
│ QQuery 40 │         14.34 / 15.46 ±1.39 / 18.14 ms │        14.26 / 14.55 ±0.15 / 14.71 ms │ +1.06x faster │
│ QQuery 41 │         13.97 / 14.21 ±0.26 / 14.71 ms │        14.12 / 14.27 ±0.12 / 14.40 ms │     no change │
│ QQuery 42 │         13.36 / 15.74 ±3.62 / 22.95 ms │        13.30 / 13.54 ±0.15 / 13.74 ms │ +1.16x faster │
└───────────┴────────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 20595.44ms │
│ Total Time (optimize-metric-label-clone)   │ 19776.53ms │
│ Average Time (HEAD)                        │   478.96ms │
│ Average Time (optimize-metric-label-clone) │   459.92ms │
│ Queries Faster                             │         21 │
│ Queries Slower                             │          2 │
│ Queries with No Change                     │         20 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

It shows similar performance improvements as lazy registration.

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love it -- this is great @xudong963 🙏

I left some suggestions but I think this PR could be merged as is.

It seems like there may be a few more places where labels are created (like this) that we could (as a follow on PR) use the same trick:

let label =
metrics::Label::new("outputPartition", output_partition.to_string());
MetricBuilder::new(metrics)
.with_label(label)
.subset_time("send_time", input_partition)

Comment thread datafusion/datasource-parquet/src/metrics.rs Outdated
) -> Self {
let name = name.into();
let value = value.into();
let name = LabelValue::from(name.into());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is quite a nice way to avoid any public API changes 👍

Comment thread datafusion/physical-expr-common/src/metrics/mod.rs Outdated
fn from(value: Cow<'static, str>) -> Self {
match value {
Cow::Borrowed(value) => Self::Static(value),
Cow::Owned(value) => Self::Shared(Arc::from(value)),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is my only concern -- it requires an extra allocation (for the Arc) and deallocation (for the String) now.

We can probably remove that overhead as a follow on PR eventually.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OKay, I'll try in a seperate PR

Comment on lines 535 to 537
@@ -533,19 +536,19 @@ impl Label {
name: impl Into<Cow<'static, str>>,
value: impl Into<Cow<'static, str>>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could potentially avoid the extra Arc allocation below by changing this sigature to

pub fn new(
        name: impl Into<LabelValue>,
        value: impl Into<LabelValue>,

And then implement From<'static str> for LabelValue, From<Arc<str>> for LabelValue and From<String> for LabelValue and From<Cow<...>> for LabelValue

🤔

That way the API is the same, but you could create the Arc directly at the callsite

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3c70c21 done

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 21, 2026

FYI @Dandandan -- this is a great find / way to improve the performance of a bunch of the already really fast clickbench queries

@alamb alamb added the performance Make DataFusion faster label May 21, 2026
@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 21, 2026

run benchmark clickbench_partitioned

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4507720823-253-qg5d6 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing optimize-metric-label-clone (e049019) to c8b784a (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃           optimize-metric-label-clone ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.26 / 4.83 ±7.00 / 18.82 ms │          1.28 / 4.82 ±6.90 / 18.61 ms │     no change │
│ QQuery 1  │        12.99 / 13.35 ±0.19 / 13.51 ms │        12.72 / 12.96 ±0.14 / 13.11 ms │     no change │
│ QQuery 2  │        36.56 / 36.84 ±0.25 / 37.31 ms │        35.32 / 35.81 ±0.36 / 36.42 ms │     no change │
│ QQuery 3  │        31.69 / 32.21 ±0.63 / 33.46 ms │        30.62 / 31.05 ±0.29 / 31.51 ms │     no change │
│ QQuery 4  │     230.25 / 235.29 ±4.37 / 242.73 ms │     229.78 / 233.42 ±3.03 / 237.45 ms │     no change │
│ QQuery 5  │     279.29 / 281.13 ±2.09 / 285.10 ms │     277.18 / 279.21 ±1.53 / 281.00 ms │     no change │
│ QQuery 6  │           1.30 / 1.44 ±0.23 / 1.89 ms │           1.31 / 1.46 ±0.23 / 1.90 ms │     no change │
│ QQuery 7  │        14.30 / 14.47 ±0.11 / 14.62 ms │        13.70 / 13.97 ±0.15 / 14.11 ms │     no change │
│ QQuery 8  │     328.33 / 331.99 ±2.40 / 334.93 ms │     325.64 / 329.15 ±2.65 / 332.79 ms │     no change │
│ QQuery 9  │     456.11 / 471.01 ±9.85 / 486.89 ms │     466.36 / 474.78 ±6.82 / 486.34 ms │     no change │
│ QQuery 10 │        72.64 / 74.34 ±1.01 / 75.45 ms │        69.61 / 70.34 ±0.46 / 71.01 ms │ +1.06x faster │
│ QQuery 11 │        85.30 / 85.72 ±0.48 / 86.59 ms │        81.38 / 83.86 ±4.61 / 93.06 ms │     no change │
│ QQuery 12 │     278.05 / 285.44 ±4.01 / 289.64 ms │     272.27 / 278.51 ±5.43 / 287.14 ms │     no change │
│ QQuery 13 │    383.15 / 394.51 ±12.79 / 418.68 ms │     373.20 / 378.43 ±4.52 / 386.86 ms │     no change │
│ QQuery 14 │     292.52 / 295.84 ±4.40 / 304.33 ms │     286.48 / 291.06 ±3.12 / 295.74 ms │     no change │
│ QQuery 15 │     280.34 / 286.76 ±6.45 / 295.17 ms │     273.34 / 278.44 ±4.77 / 286.41 ms │     no change │
│ QQuery 16 │     634.07 / 646.64 ±9.51 / 657.60 ms │     622.94 / 630.83 ±5.76 / 639.45 ms │     no change │
│ QQuery 17 │     641.14 / 644.68 ±2.57 / 648.89 ms │    628.26 / 639.62 ±11.81 / 659.55 ms │     no change │
│ QQuery 18 │ 1293.90 / 1316.08 ±28.67 / 1372.04 ms │ 1272.08 / 1299.26 ±25.60 / 1336.83 ms │     no change │
│ QQuery 19 │        28.79 / 29.11 ±0.50 / 30.10 ms │        27.71 / 28.04 ±0.19 / 28.31 ms │     no change │
│ QQuery 20 │     523.48 / 530.34 ±7.95 / 543.42 ms │    521.28 / 531.94 ±14.36 / 560.10 ms │     no change │
│ QQuery 21 │     596.20 / 602.38 ±4.06 / 607.63 ms │     598.76 / 602.24 ±2.31 / 604.88 ms │     no change │
│ QQuery 22 │ 1065.19 / 1079.81 ±11.64 / 1095.59 ms │  1057.63 / 1065.52 ±5.68 / 1071.77 ms │     no change │
│ QQuery 23 │ 3260.32 / 3285.25 ±18.31 / 3315.70 ms │ 3219.82 / 3246.02 ±28.48 / 3287.02 ms │     no change │
│ QQuery 24 │        41.94 / 42.98 ±1.31 / 45.41 ms │        41.34 / 42.28 ±1.16 / 44.10 ms │     no change │
│ QQuery 25 │     112.85 / 115.94 ±3.75 / 123.15 ms │     112.24 / 112.71 ±0.52 / 113.61 ms │     no change │
│ QQuery 26 │        42.46 / 46.89 ±5.12 / 56.76 ms │        41.94 / 42.82 ±0.69 / 43.87 ms │ +1.09x faster │
│ QQuery 27 │     675.02 / 685.13 ±8.20 / 699.79 ms │     674.60 / 683.30 ±4.73 / 688.26 ms │     no change │
│ QQuery 28 │ 3048.59 / 3061.36 ±12.07 / 3081.58 ms │ 3039.64 / 3078.45 ±25.68 / 3113.51 ms │     no change │
│ QQuery 29 │        41.93 / 42.24 ±0.32 / 42.75 ms │        41.58 / 41.97 ±0.40 / 42.69 ms │     no change │
│ QQuery 30 │     299.61 / 311.63 ±8.21 / 323.55 ms │     308.02 / 313.44 ±9.21 / 331.80 ms │     no change │
│ QQuery 31 │    283.87 / 298.64 ±13.53 / 322.38 ms │     287.86 / 293.63 ±8.10 / 309.35 ms │     no change │
│ QQuery 32 │   942.22 / 997.06 ±54.61 / 1088.21 ms │   948.52 / 972.71 ±18.26 / 1005.20 ms │     no change │
│ QQuery 33 │ 1455.05 / 1482.99 ±21.69 / 1516.32 ms │ 1468.30 / 1495.05 ±24.59 / 1540.06 ms │     no change │
│ QQuery 34 │ 1490.94 / 1517.69 ±39.48 / 1594.63 ms │ 1483.93 / 1509.53 ±17.02 / 1535.37 ms │     no change │
│ QQuery 35 │    287.25 / 319.72 ±57.22 / 434.09 ms │    290.36 / 309.60 ±16.22 / 339.30 ms │     no change │
│ QQuery 36 │      66.48 / 82.81 ±22.48 / 127.38 ms │        66.19 / 71.66 ±7.10 / 85.50 ms │ +1.16x faster │
│ QQuery 37 │        36.41 / 38.13 ±2.36 / 42.80 ms │        35.77 / 37.85 ±2.38 / 41.12 ms │     no change │
│ QQuery 38 │        43.96 / 48.52 ±4.95 / 56.81 ms │        45.65 / 51.14 ±4.53 / 56.71 ms │  1.05x slower │
│ QQuery 39 │     140.61 / 151.71 ±9.15 / 165.86 ms │     150.47 / 155.60 ±6.88 / 169.23 ms │     no change │
│ QQuery 40 │        14.61 / 14.90 ±0.24 / 15.27 ms │        13.89 / 17.70 ±4.18 / 24.16 ms │  1.19x slower │
│ QQuery 41 │        14.32 / 15.43 ±1.91 / 19.24 ms │        13.98 / 14.50 ±0.44 / 15.26 ms │ +1.06x faster │
│ QQuery 42 │        13.90 / 14.06 ±0.14 / 14.29 ms │        13.41 / 13.56 ±0.16 / 13.87 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 20267.32ms │
│ Total Time (optimize-metric-label-clone)   │ 20098.22ms │
│ Average Time (HEAD)                        │   471.33ms │
│ Average Time (optimize-metric-label-clone) │   467.40ms │
│ Queries Faster                             │          4 │
│ Queries Slower                             │          2 │
│ Queries with No Change                     │         37 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 30.7 GiB
Avg memory 23.1 GiB
CPU user 1046.2s
CPU sys 70.4s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 105.0s
Peak memory 30.1 GiB
Avg memory 23.0 GiB
CPU user 1042.5s
CPU sys 69.4s
Peak spill 0 B

File an issue against this benchmark runner

@xudong963 xudong963 force-pushed the optimize-metric-label-clone branch from e049019 to 3a4b942 Compare May 22, 2026 02:33
@xudong963 xudong963 force-pushed the optimize-metric-label-clone branch from e344f5e to fe340a8 Compare May 22, 2026 06:06
@xudong963
Copy link
Copy Markdown
Member Author

run benchmark clickbench_partitioned

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4515703210-279-vtp8c 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing optimize-metric-label-clone (fe340a8) to c8b784a (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃           optimize-metric-label-clone ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.28 / 4.82 ±6.94 / 18.69 ms │          1.32 / 4.94 ±7.08 / 19.10 ms │     no change │
│ QQuery 1  │        12.43 / 13.02 ±0.33 / 13.37 ms │        13.13 / 13.60 ±0.33 / 14.06 ms │     no change │
│ QQuery 2  │        35.94 / 36.24 ±0.27 / 36.66 ms │        36.31 / 36.76 ±0.52 / 37.77 ms │     no change │
│ QQuery 3  │        31.05 / 31.71 ±0.59 / 32.62 ms │        31.48 / 31.84 ±0.37 / 32.37 ms │     no change │
│ QQuery 4  │     229.71 / 231.19 ±1.34 / 233.46 ms │     234.43 / 240.18 ±3.22 / 244.09 ms │     no change │
│ QQuery 5  │     274.89 / 278.05 ±2.42 / 282.18 ms │     283.74 / 286.49 ±1.89 / 289.41 ms │     no change │
│ QQuery 6  │           1.30 / 1.43 ±0.22 / 1.87 ms │           1.37 / 1.51 ±0.22 / 1.94 ms │  1.05x slower │
│ QQuery 7  │        13.95 / 14.34 ±0.23 / 14.55 ms │        14.97 / 15.12 ±0.13 / 15.33 ms │  1.05x slower │
│ QQuery 8  │     322.95 / 326.26 ±1.93 / 328.45 ms │     333.26 / 340.43 ±5.44 / 348.70 ms │     no change │
│ QQuery 9  │     459.20 / 463.39 ±3.23 / 468.22 ms │     468.11 / 476.52 ±6.29 / 485.93 ms │     no change │
│ QQuery 10 │        72.78 / 73.40 ±0.56 / 74.15 ms │        71.40 / 76.97 ±9.49 / 95.92 ms │     no change │
│ QQuery 11 │        84.21 / 86.09 ±1.97 / 88.59 ms │        84.03 / 84.71 ±0.60 / 85.73 ms │     no change │
│ QQuery 12 │     269.61 / 277.45 ±5.43 / 284.17 ms │     278.98 / 283.83 ±5.48 / 292.13 ms │     no change │
│ QQuery 13 │    373.35 / 390.32 ±12.52 / 406.58 ms │     383.93 / 386.84 ±1.64 / 388.65 ms │     no change │
│ QQuery 14 │     289.98 / 292.20 ±2.41 / 296.80 ms │     291.21 / 294.77 ±3.39 / 300.74 ms │     no change │
│ QQuery 15 │     276.73 / 281.54 ±3.85 / 285.89 ms │     274.02 / 279.25 ±6.51 / 289.81 ms │     no change │
│ QQuery 16 │     619.04 / 632.20 ±9.90 / 649.05 ms │     627.82 / 635.99 ±7.14 / 648.29 ms │     no change │
│ QQuery 17 │     622.60 / 625.48 ±2.81 / 630.51 ms │     635.16 / 643.50 ±9.07 / 656.93 ms │     no change │
│ QQuery 18 │ 1273.25 / 1293.81 ±16.64 / 1314.51 ms │ 1284.32 / 1305.98 ±12.79 / 1322.66 ms │     no change │
│ QQuery 19 │        28.22 / 28.38 ±0.09 / 28.49 ms │        28.41 / 28.73 ±0.23 / 29.09 ms │     no change │
│ QQuery 20 │     522.95 / 528.38 ±7.72 / 543.67 ms │     522.98 / 532.78 ±6.67 / 542.58 ms │     no change │
│ QQuery 21 │     593.22 / 599.83 ±4.02 / 605.48 ms │     596.52 / 605.57 ±5.21 / 612.02 ms │     no change │
│ QQuery 22 │  1073.45 / 1076.73 ±2.59 / 1081.09 ms │  1064.73 / 1074.03 ±8.40 / 1087.94 ms │     no change │
│ QQuery 23 │ 3189.13 / 3217.05 ±22.64 / 3250.93 ms │ 3214.79 / 3242.48 ±33.58 / 3299.35 ms │     no change │
│ QQuery 24 │        42.36 / 47.34 ±7.79 / 62.74 ms │        41.93 / 49.66 ±8.72 / 65.30 ms │     no change │
│ QQuery 25 │     112.80 / 115.44 ±3.84 / 123.01 ms │     111.37 / 113.36 ±1.06 / 114.40 ms │     no change │
│ QQuery 26 │        42.76 / 43.25 ±0.51 / 44.13 ms │        42.28 / 42.42 ±0.17 / 42.70 ms │     no change │
│ QQuery 27 │     675.76 / 679.03 ±4.62 / 687.95 ms │     680.87 / 687.15 ±4.17 / 691.86 ms │     no change │
│ QQuery 28 │ 3053.49 / 3116.67 ±86.91 / 3284.57 ms │ 3040.90 / 3061.21 ±14.55 / 3082.13 ms │     no change │
│ QQuery 29 │        42.17 / 45.89 ±4.65 / 53.84 ms │        41.59 / 42.00 ±0.30 / 42.45 ms │ +1.09x faster │
│ QQuery 30 │     303.63 / 313.82 ±7.87 / 326.30 ms │     307.04 / 312.60 ±3.94 / 318.19 ms │     no change │
│ QQuery 31 │    287.96 / 299.11 ±10.74 / 318.32 ms │    287.93 / 301.90 ±12.87 / 324.78 ms │     no change │
│ QQuery 32 │     930.09 / 942.14 ±6.52 / 948.16 ms │     928.47 / 941.20 ±9.51 / 952.58 ms │     no change │
│ QQuery 33 │ 1450.92 / 1467.64 ±19.47 / 1505.84 ms │ 1446.30 / 1486.95 ±21.60 / 1505.61 ms │     no change │
│ QQuery 34 │ 1443.75 / 1470.17 ±23.83 / 1501.94 ms │ 1470.69 / 1493.24 ±11.46 / 1500.52 ms │     no change │
│ QQuery 35 │    288.14 / 317.20 ±42.52 / 401.30 ms │    284.49 / 297.62 ±10.61 / 313.33 ms │ +1.07x faster │
│ QQuery 36 │        68.06 / 74.37 ±3.51 / 77.98 ms │        65.87 / 74.03 ±9.00 / 91.45 ms │     no change │
│ QQuery 37 │        36.19 / 36.50 ±0.21 / 36.74 ms │        35.98 / 37.30 ±1.91 / 41.10 ms │     no change │
│ QQuery 38 │        42.60 / 47.95 ±5.35 / 56.09 ms │        42.94 / 45.55 ±2.22 / 49.64 ms │ +1.05x faster │
│ QQuery 39 │     133.77 / 145.95 ±8.07 / 157.65 ms │     134.99 / 148.05 ±7.46 / 156.96 ms │     no change │
│ QQuery 40 │        14.62 / 15.68 ±1.31 / 18.25 ms │        14.27 / 15.13 ±0.65 / 16.10 ms │     no change │
│ QQuery 41 │        14.37 / 14.51 ±0.11 / 14.64 ms │        14.08 / 18.20 ±3.30 / 21.55 ms │  1.25x slower │
│ QQuery 42 │        13.79 / 15.81 ±3.65 / 23.10 ms │        13.60 / 13.75 ±0.12 / 13.95 ms │ +1.15x faster │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 20011.76ms │
│ Total Time (optimize-metric-label-clone)   │ 20104.16ms │
│ Average Time (HEAD)                        │   465.39ms │
│ Average Time (optimize-metric-label-clone) │   467.54ms │
│ Queries Faster                             │          4 │
│ Queries Slower                             │          3 │
│ Queries with No Change                     │         36 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 29.9 GiB
Avg memory 23.1 GiB
CPU user 1040.7s
CPU sys 64.5s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 105.0s
Peak memory 29.7 GiB
Avg memory 23.0 GiB
CPU user 1045.1s
CPU sys 66.4s
Peak spill 0 B

File an issue against this benchmark runner

@xudong963
Copy link
Copy Markdown
Member Author

run benchmark clickbench_partitioned

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4516065468-281-ls2mj 6.12.68+ #1 SMP Wed Apr 1 02:23:28 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing optimize-metric-label-clone (fe340a8) to c8b784a (merge-base) diff using: clickbench_partitioned
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and optimize-metric-label-clone
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃           optimize-metric-label-clone ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.25 / 4.69 ±6.84 / 18.36 ms │          1.22 / 4.69 ±6.85 / 18.38 ms │     no change │
│ QQuery 1  │        12.60 / 12.70 ±0.08 / 12.85 ms │        12.86 / 13.06 ±0.14 / 13.27 ms │     no change │
│ QQuery 2  │        35.80 / 36.02 ±0.19 / 36.23 ms │        36.41 / 36.69 ±0.20 / 37.03 ms │     no change │
│ QQuery 3  │        30.67 / 31.36 ±0.73 / 32.65 ms │        31.11 / 34.05 ±3.12 / 37.94 ms │  1.09x slower │
│ QQuery 4  │     222.93 / 223.74 ±0.75 / 224.88 ms │     217.55 / 224.93 ±5.05 / 231.02 ms │     no change │
│ QQuery 5  │     270.04 / 271.62 ±1.09 / 273.34 ms │     267.90 / 272.36 ±3.30 / 277.11 ms │     no change │
│ QQuery 6  │           1.27 / 1.42 ±0.22 / 1.86 ms │           1.29 / 1.42 ±0.22 / 1.86 ms │     no change │
│ QQuery 7  │        13.66 / 13.73 ±0.07 / 13.85 ms │        13.71 / 13.92 ±0.15 / 14.17 ms │     no change │
│ QQuery 8  │     318.07 / 323.12 ±3.11 / 326.39 ms │     309.55 / 316.86 ±4.10 / 321.76 ms │     no change │
│ QQuery 9  │     442.99 / 453.38 ±6.80 / 460.44 ms │    443.49 / 452.15 ±10.23 / 471.09 ms │     no change │
│ QQuery 10 │        71.06 / 71.67 ±0.42 / 72.23 ms │        70.71 / 72.36 ±2.46 / 77.21 ms │     no change │
│ QQuery 11 │        81.62 / 82.26 ±0.59 / 83.15 ms │        81.76 / 82.61 ±0.51 / 83.17 ms │     no change │
│ QQuery 12 │     262.69 / 272.47 ±8.66 / 285.91 ms │     262.55 / 267.29 ±3.88 / 273.63 ms │     no change │
│ QQuery 13 │     367.21 / 377.20 ±8.67 / 391.34 ms │    376.08 / 391.43 ±15.30 / 420.71 ms │     no change │
│ QQuery 14 │     278.27 / 282.12 ±3.67 / 288.95 ms │     277.05 / 281.13 ±4.67 / 289.71 ms │     no change │
│ QQuery 15 │     260.55 / 267.02 ±3.28 / 269.52 ms │     259.96 / 266.55 ±3.71 / 271.00 ms │     no change │
│ QQuery 16 │     610.37 / 618.56 ±6.18 / 628.95 ms │     609.94 / 614.95 ±4.93 / 624.40 ms │     no change │
│ QQuery 17 │    614.52 / 623.69 ±10.13 / 641.57 ms │     605.94 / 611.96 ±4.15 / 618.79 ms │     no change │
│ QQuery 18 │  1242.06 / 1256.78 ±9.63 / 1267.12 ms │ 1236.17 / 1250.81 ±17.19 / 1284.27 ms │     no change │
│ QQuery 19 │       28.11 / 36.20 ±10.52 / 56.72 ms │        28.01 / 30.87 ±4.84 / 40.53 ms │ +1.17x faster │
│ QQuery 20 │     517.66 / 527.32 ±9.92 / 544.93 ms │    520.97 / 536.62 ±21.82 / 578.37 ms │     no change │
│ QQuery 21 │     595.13 / 599.52 ±4.66 / 608.23 ms │     595.57 / 600.23 ±3.63 / 604.55 ms │     no change │
│ QQuery 22 │  1058.46 / 1067.71 ±7.68 / 1076.64 ms │  1059.57 / 1068.52 ±8.56 / 1084.31 ms │     no change │
│ QQuery 23 │ 3166.98 / 3193.17 ±26.24 / 3237.98 ms │ 3167.36 / 3193.43 ±17.68 / 3217.24 ms │     no change │
│ QQuery 24 │        41.88 / 44.13 ±2.65 / 49.01 ms │        41.40 / 45.86 ±5.68 / 57.08 ms │     no change │
│ QQuery 25 │     112.23 / 113.04 ±0.66 / 114.13 ms │     111.62 / 113.17 ±0.91 / 114.38 ms │     no change │
│ QQuery 26 │        42.42 / 44.53 ±3.39 / 51.28 ms │        42.03 / 42.61 ±0.44 / 43.24 ms │     no change │
│ QQuery 27 │     673.09 / 678.40 ±3.65 / 683.45 ms │     668.80 / 676.08 ±7.53 / 689.20 ms │     no change │
│ QQuery 28 │ 3003.49 / 3022.78 ±13.52 / 3043.27 ms │ 2990.73 / 3018.76 ±16.13 / 3038.58 ms │     no change │
│ QQuery 29 │        41.46 / 45.76 ±5.23 / 53.21 ms │        41.23 / 49.06 ±6.69 / 58.00 ms │  1.07x slower │
│ QQuery 30 │     295.06 / 298.80 ±2.92 / 303.59 ms │     296.22 / 300.61 ±3.68 / 306.35 ms │     no change │
│ QQuery 31 │     282.78 / 286.56 ±3.95 / 293.83 ms │     289.20 / 294.85 ±3.82 / 300.18 ms │     no change │
│ QQuery 32 │    881.41 / 900.14 ±14.12 / 925.17 ms │    919.33 / 945.23 ±18.38 / 967.29 ms │  1.05x slower │
│ QQuery 33 │ 1396.38 / 1424.69 ±24.74 / 1455.15 ms │ 1394.93 / 1430.43 ±27.08 / 1477.77 ms │     no change │
│ QQuery 34 │ 1405.22 / 1434.37 ±20.46 / 1468.73 ms │ 1424.00 / 1446.95 ±19.20 / 1476.54 ms │     no change │
│ QQuery 35 │    275.07 / 281.65 ±10.45 / 302.44 ms │    278.66 / 300.21 ±28.04 / 352.68 ms │  1.07x slower │
│ QQuery 36 │        62.69 / 64.57 ±1.08 / 66.05 ms │        65.09 / 68.20 ±2.14 / 71.57 ms │  1.06x slower │
│ QQuery 37 │        35.59 / 38.62 ±2.30 / 40.71 ms │        35.41 / 44.62 ±8.89 / 58.98 ms │  1.16x slower │
│ QQuery 38 │        43.62 / 47.82 ±3.90 / 54.49 ms │        41.26 / 43.65 ±2.20 / 47.68 ms │ +1.10x faster │
│ QQuery 39 │     130.99 / 146.34 ±8.95 / 155.57 ms │     143.21 / 148.20 ±5.16 / 156.53 ms │     no change │
│ QQuery 40 │        14.10 / 14.71 ±0.66 / 15.94 ms │        14.03 / 17.13 ±4.88 / 26.86 ms │  1.16x slower │
│ QQuery 41 │        13.41 / 13.65 ±0.16 / 13.87 ms │        13.51 / 13.60 ±0.06 / 13.70 ms │     no change │
│ QQuery 42 │        13.10 / 14.91 ±3.32 / 21.55 ms │        13.06 / 14.57 ±2.54 / 19.62 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                          ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                          │ 19562.97ms │
│ Total Time (optimize-metric-label-clone)   │ 19652.68ms │
│ Average Time (HEAD)                        │   454.95ms │
│ Average Time (optimize-metric-label-clone) │   457.04ms │
│ Queries Faster                             │          2 │
│ Queries Slower                             │          7 │
│ Queries with No Change                     │         34 │
│ Queries with Failure                       │          0 │
└────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 29.8 GiB
Avg memory 23.0 GiB
CPU user 1017.5s
CPU sys 64.1s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 30.4 GiB
Avg memory 23.4 GiB
CPU user 1018.4s
CPU sys 65.1s
Peak spill 0 B

File an issue against this benchmark runner

@alamb
Copy link
Copy Markdown
Contributor

alamb commented May 22, 2026

One thing I find interesting is that improvement of delaying metric creation you did in #22353 seems to have a bigger positive improvement:

As in there is more overhead to these metrics than just the string allocation it seems 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

datasource Changes to the datasource crate performance Make DataFusion faster physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants