Skip to content

Commit e9bfbe0

Browse files
authored
chore(query): migrate benchmark to divan framework (#17816)
* chore(query): migrate benchmark to divan framework * chore(query): migrate benchmark to divan framework * chore(query): adjust profile release build to have better performance * chore(query): adjust profile release build to have better performance * chore(query): adjust profile release build to have better performance
1 parent 8d073f6 commit e9bfbe0

File tree

15 files changed

+708
-759
lines changed

15 files changed

+708
-759
lines changed

Cargo.lock

Lines changed: 38 additions & 124 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@ concurrent-queue = "2.5.0"
285285
convert_case = "0.6.0"
286286
cookie = "0.18.1"
287287
crc32fast = "1.3.2"
288-
criterion = "0.5"
289288
cron = "0.12.0"
290289
crossbeam-channel = "0.5.6"
291290
csv-core = "0.1.11"
@@ -298,6 +297,7 @@ deltalake = "0.25"
298297
derive-visitor = { version = "0.4.0", features = ["std-types-drive"] }
299298
derive_more = { version = "1.0.0", features = ["full"] }
300299
display-more = { version = "0.1.0" }
300+
divan = "0.1.21"
301301
dtparse = { git = "https://github.com/datafuse-extras/dtparse.git", rev = "30e28ca" }
302302
dyn-clone = "1.0.9"
303303
educe = { version = "1.0.0", features = ["default", "full"], package = "databend_educe" }
@@ -579,23 +579,17 @@ mutable_key_type = "allow"
579579
result_large_err = "allow"
580580
map_entry = "allow"
581581

582-
## DONT'T DELETE THIS: If we want best performance, we should use this profile but it will take longer time to compile.
583-
## Test SQL:
584-
## select sum(number) from numbers_mt(10000000000); ~ 3x performance
585-
## select max(number) from numbers_mt(10000000000); ~ 3x performance
586-
# [profile.release]
587-
# debug = 1
588-
# lto = "thin"
589-
# overflow-checks = false
590-
# incremental = false
591-
# codegen-units = 1
592-
593582
[profile.release]
594583
debug = 1
595584
lto = "thin"
596585
overflow-checks = false
597586
opt-level = "s" # defaults to be 3
598587
incremental = true
588+
codegen-units = 1 ## better performance see below comment
589+
## DONT'T DELETE THIS: If we want best performance, we should use this profile but it will take longer time to compile.
590+
## Test SQL:
591+
## select sum(number) from numbers_mt(10000000000); ~ 3x performance
592+
## select max(number) from numbers_mt(10000000000); ~ 3x performance
599593

600594
[profile.ci]
601595
inherits = "release"
@@ -625,6 +619,7 @@ databend-common-exception = { opt-level = 3 }
625619
[profile.bench]
626620
debug = true
627621
overflow-checks = false
622+
debug-assertions = true
628623

629624
[profile.test]
630625
opt-level = 0

src/query/ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ unindent = { workspace = true }
3535
url = { workspace = true }
3636

3737
[dev-dependencies]
38-
criterion = { workspace = true }
38+
divan = { workspace = true }
3939
goldenfile = { workspace = true }
4040

4141
[[bench]]

0 commit comments

Comments
 (0)