apache / opendal

Apache OpenDAL: One Layer, All Storage.
https://opendal.apache.org
Apache License 2.0
3.47k stars 486 forks source link

chore: Polish the debug output of capability #5315

Closed Xuanwo closed 1 week ago

Xuanwo commented 1 week ago

Which issue does this PR close?

Nope

Rationale for this change

The old debug output of capability requires multiple alloc.

What changes are included in this PR?

This PR makes it zero cost and removes some not useful debug output.

Are there any user-facing changes?

codspeed-hq[bot] commented 1 week ago

CodSpeed Performance Report

Merging #5315 will degrade performances by 15.89%

Comparing polish-capability (7310ef0) with main (7b18680)

Summary

❌ 8 regressions ✅ 65 untouched benchmarks

:warning: Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main polish-capability Change
buffer 256 KiB * 32 chunk 183.6 ns 212.8 ns -13.71%
buffer 256 KiB * 4 chunk 154.4 ns 183.6 ns -15.89%
buffer 4.00 MiB * 32 chunk 154.4 ns 183.6 ns -15.89%
buffer 4.00 MiB * 4 chunk 154.4 ns 183.6 ns -15.89%
256 KiB * 1000k truncate 245.8 ns 275 ns -10.61%
256 KiB * 100k truncate 245.8 ns 275 ns -10.61%
256 KiB * 10k truncate 245.8 ns 275 ns -10.61%
256 KiB * 1k truncate 245.8 ns 275 ns -10.61%