Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: optimize RecordBatch to HttpOutput conversion #4178

Merged
merged 8 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add profiler
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia committed Jun 20, 2024
commit 41e6f929969b252e741682527075924e5fe9ff42
35 changes: 31 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ catalog = { workspace = true, features = ["testing"] }
client = { workspace = true, features = ["testing"] }
common-base.workspace = true
common-test-util.workspace = true
criterion = "0.4"
criterion = "0.5"
mysql_async = { version = "0.33", default-features = false, features = [
"default-rustls",
] }
permutation = "0.4"
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }
rand.workspace = true
script = { workspace = true, features = ["python"] }
serde_json.workspace = true
Expand Down
7 changes: 6 additions & 1 deletion src/servers/benches/to_http_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use common_recordbatch::RecordBatch;
use criterion::{criterion_group, criterion_main, Criterion};
use datatypes::schema::SchemaRef;
use datatypes::vectors::StringVector;
use pprof::criterion::{Output, PProfProfiler};
use servers::http::HttpRecordsOutput;

fn mock_schema() -> SchemaRef {
Expand Down Expand Up @@ -70,5 +71,9 @@ fn bench_convert_record_batch_to_http_output(c: &mut Criterion) {
});
}

criterion_group!(benches, bench_convert_record_batch_to_http_output,);
criterion_group! {
name = benches;
config = Criterion::default().with_profiler(PProfProfiler::new(101, Output::Flamegraph(None)));
targets = bench_convert_record_batch_to_http_output
}
criterion_main!(benches);