Skip to content

Commit

Permalink
fix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Dec 9, 2024
1 parent 5d72e75 commit f5188c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/stream/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ auto_enums = { workspace = true }
await-tree = { workspace = true }
bytes = "1"
cfg-if = "1"
criterion = { workspace = true, features = ["async_tokio", "async"] }
delta_btree_map = { path = "../utils/delta_btree_map" }
educe = "0.6"
either = "1"
Expand Down Expand Up @@ -90,6 +89,7 @@ workspace-hack = { path = "../workspace-hack" }

[dev-dependencies]
assert_matches = "1"
criterion = { workspace = true, features = ["async_tokio", "async"] }
dhat = "0.3"
expect-test = "1"
risingwave_expr_impl = { workspace = true }
Expand Down
10 changes: 9 additions & 1 deletion src/stream/benches/stream_hash_agg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use criterion::{black_box, criterion_group, criterion_main, BatchSize, Criterion};
use futures::executor::block_on;
use futures::StreamExt;
use risingwave_common::array::StreamChunk;
use risingwave_common::catalog::{Field, Schema};
use risingwave_common::field_generator::VarcharProperty;
Expand Down Expand Up @@ -147,5 +148,12 @@ fn setup_bench_hash_agg<S: StateStore>(store: S) -> Executor {
))
}

pub async fn execute_executor(executor: Executor) {
let mut stream = executor.execute();
while let Some(ret) = stream.next().await {
_ = black_box(ret.unwrap());
}
}

criterion_group!(benches, bench_hash_agg);
criterion_main!(benches);
8 changes: 0 additions & 8 deletions src/stream/src/executor/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

use async_trait::async_trait;
use criterion::black_box;
use futures::{FutureExt, StreamExt, TryStreamExt};
use futures_async_stream::try_stream;
use risingwave_common::catalog::Schema;
Expand Down Expand Up @@ -180,13 +179,6 @@ impl Execute for MockSource {
}
}

pub async fn execute_executor(executor: Executor) {
let mut stream = executor.execute();
while let Some(ret) = stream.next().await {
_ = black_box(ret.unwrap());
}
}

/// `row_nonnull` builds a `OwnedRow` with concrete values.
/// TODO: add macro row!, which requires a new trait `ToScalarValue`.
#[macro_export]
Expand Down

0 comments on commit f5188c8

Please sign in to comment.