Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,8 @@ jobs:
run: cargo test --workspace --locked
env:
RUSTC_WRAPPER: sccache

- name: Run system-bench tests with planeval
run: cargo test -p system-bench --features planeval --locked
env:
RUSTC_WRAPPER: sccache
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repos:
- id: cargo-test
name: cargo test
description: Run all Rust workspace tests.
entry: bash -c 'cargo test --workspace'
entry: bash -c 'cargo test --workspace && cargo test -p system-bench --features planeval'
language: system
files: \.rs$
pass_filenames: false
62 changes: 22 additions & 40 deletions Cargo.lock

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

8 changes: 3 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workspace manifest for sketch-bench.
# Workspace manifest for ASAPBench.
[workspace]
resolver = "2"
members = [
Expand All @@ -7,9 +7,7 @@ members = [
"sketch-bench",
"aqpbm-cli",
"aqpbm-usecase",
"aqpbm-planeval",
"aqpbm-systemeval",
"aqpbm-engines-external",
"system-bench",
]

exclude = ["sketch-runtime"]
Expand All @@ -18,7 +16,7 @@ exclude = ["sketch-runtime"]
version = "0.1.0"
edition = "2021"
license = "MIT"
repository = "https://github.com/ProjectASAP/sketch-bench"
repository = "https://github.com/ProjectASAP/ASAPBench"

[workspace.dependencies]
# Serde + JSON for the report schema (`aqpbm_core::report`).
Expand Down
11 changes: 0 additions & 11 deletions aqpbm-engines-external/Cargo.toml

This file was deleted.

24 changes: 0 additions & 24 deletions aqpbm-planeval/Cargo.toml

This file was deleted.

20 changes: 0 additions & 20 deletions aqpbm-systemeval/Cargo.toml

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/use_cases/run_all_use_cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if [ -z "$cases" ]; then
cases=$(python3 -c "import sys; sys.path.insert(0, 'scripts/use_cases'); import cases; print(','.join(cases.load()))")
fi

cargo build --release -p aqpbm-planeval
cargo build --release -p system-bench --features planeval

for case_id in ${cases//,/ }; do
arm=()
Expand Down
53 changes: 53 additions & 0 deletions system-bench/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[package]
name = "system-bench"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "System level: runs ASAPPlanner's plans on its executor (feature planeval), translates ASAPPlanner plan files for external engines, and writes a spec's samples to time series systems and asks them its queries."

[features]
planeval = [
"dep:asap-planner",
"dep:asap-executor",
"dep:asap-types",
"dep:asap-frontend-promql",
"dep:asap_sketchlib",
"dep:futures",
"dep:tokio",
]

[[bin]]
name = "planeval"
path = "src/bin/planeval.rs"
required-features = ["planeval"]

[[bin]]
name = "systemeval"
path = "src/bin/systemeval.rs"

[[test]]
name = "uc1"
required-features = ["planeval"]

[[test]]
name = "declared_truth"
required-features = ["planeval"]

[dependencies]
asap-planner = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "b822553f1ea7e5fc60940dd23536d1f6c99c5334", default-features = false, features = ["test-support"], optional = true }
asap-executor = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "b822553f1ea7e5fc60940dd23536d1f6c99c5334", optional = true }
asap-types = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "b822553f1ea7e5fc60940dd23536d1f6c99c5334", optional = true }
asap-frontend-promql = { git = "https://github.com/ProjectASAP/ASAPPlanner", rev = "b822553f1ea7e5fc60940dd23536d1f6c99c5334", optional = true }
asap_sketchlib = { workspace = true, optional = true }
futures = { version = "0.3", optional = true }
tokio = { version = "1", features = ["rt", "macros"], optional = true }
aqpbm-usecase.workspace = true
anyhow.workspace = true
clap.workspace = true
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
prost = "0.13"
snap = "1.1"
ureq = { version = "2", default-features = false }
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use std::time::Instant;
use anyhow::{Context, Result};
use clap::Parser;

use aqpbm_planeval::plan::{plan, summary, Arm};
use aqpbm_planeval::run::Driver;
use aqpbm_usecase::accuracy::AnswerAt;
use aqpbm_usecase::data::generate;
use aqpbm_usecase::output::{
Expand All @@ -14,6 +12,8 @@ use aqpbm_usecase::output::{
};
use aqpbm_usecase::score::{read_answers, score};
use aqpbm_usecase::spec::Spec;
use system_bench::planeval::plan::{plan, summary, Arm};
use system_bench::planeval::run::Driver;

#[derive(Parser, Debug)]
#[command(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
mod query;
mod remote_write;
mod system;
mod write;

use std::collections::BTreeMap;
use std::path::PathBuf;
use std::time::Instant;
Expand All @@ -15,8 +10,9 @@ use aqpbm_usecase::spec::Spec;
use clap::builder::PossibleValuesParser;
use clap::Parser;

use crate::query::{ask, Collected};
use crate::write::{Options, Writer};
use system_bench::systemeval::query::{ask, Collected};
use system_bench::systemeval::system;
use system_bench::systemeval::write::{Options, Writer};

#[derive(Parser, Debug)]
#[command(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ use std::collections::BTreeMap;

use serde_json::Value;

use crate::plan_file::{
use super::plan_file::{
Lifetime, Measure, PlanFile, PlanNode, PlanOperator, Predicate, RangeKind, Reduction, Source,
SummaryFamily, Timing,
};
use crate::{NodeId, SharingLost, Substitution, TranslationError};
use super::{NodeId, SharingLost, Substitution, TranslationError};

/// The plan's series identity column, a label column like any other. It has
/// one value per series, so it is a plain `String`: `LowCardinality` pays
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

use serde_json::{Map, Value};

use crate::{NodeId, TranslationError};
use super::{NodeId, TranslationError};

/// The `InstallablePlan` wire version this decoder reads (ASAPPlanner
/// `INSTALLABLE_PLAN_WIRE_VERSION`).
Expand Down
4 changes: 4 additions & 0 deletions system-bench/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub mod engines_external;
#[cfg(feature = "planeval")]
pub mod planeval;
pub mod systemeval;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use asap_planner::{
};
use serde_json::{json, Value};

use crate::sketch_analytics::{analytics, statistics};
use super::sketch_analytics::{analytics, statistics};
use aqpbm_usecase::spec::{QuerySpec, Spec};

#[derive(Debug, Clone, Copy)]
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions system-bench/src/systemeval/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub mod query;
pub mod remote_write;
pub mod system;
pub mod write;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use anyhow::Result;
use aqpbm_usecase::data::Series;
use aqpbm_usecase::output::WriteSummary;

use crate::remote_write::{encode, Label, Sample, TimeSeries, WriteRequest};
use crate::system::{Sent, System};
use super::remote_write::{encode, Label, Sample, TimeSeries, WriteRequest};
use super::system::{Sent, System};

pub struct Options {
pub batch_samples: usize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

mod common;

use aqpbm_engines_external::clickhouse::{translate, ClickHouseDeployment, INSERT_SETTINGS};
use aqpbm_engines_external::plan_file::PlanFile;
use common::{
fixture, fixture_value_public, least_common_multiple, payload_body, public_fixture,
run_clickhouse,
};
use serde_json::json;
use system_bench::engines_external::clickhouse::{
translate, ClickHouseDeployment, INSERT_SETTINGS,
};
use system_bench::engines_external::plan_file::PlanFile;

/// The deployment's tables and views, then `setup`, then query `query`.
fn script(deployment: &ClickHouseDeployment, setup: &[String], query: usize) -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

mod common;

use aqpbm_engines_external::clickhouse::{translate, ClickHouseDeployment, TableRetention};
use aqpbm_engines_external::plan_file::PlanFile;
use aqpbm_engines_external::{SharingLost, Substitution, TranslationError};
use common::{
fixture, fixture_value, fixture_value_public, golden, normalized, payload_body, public_fixture,
};
use serde_json::{json, Value};
use system_bench::engines_external::clickhouse::{translate, ClickHouseDeployment, TableRetention};
use system_bench::engines_external::plan_file::PlanFile;
use system_bench::engines_external::{SharingLost, Substitution, TranslationError};

fn translated(name: &str) -> ClickHouseDeployment {
translate(&fixture(name)).expect("translates")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use std::path::PathBuf;

use aqpbm_engines_external::plan_file::PlanFile;
use serde_json::Value;
use system_bench::engines_external::plan_file::PlanFile;

pub fn fixture_path(name: &str) -> PathBuf {
PathBuf::from(env!("CARGO_MANIFEST_DIR"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use std::collections::BTreeMap;
use std::path::Path;

use aqpbm_planeval::plan::{workload, Arm};
use aqpbm_usecase::spec::{Spec, Statistic, Truth};
use asap_types::ir::operator::{AggIntent, Reduction, Source};
use asap_types::ir::scalar::{CompareOpKind, ScalarValue};
use asap_types::ir::{NonASAPOp, Operator, OperatorNode, QueryRoot, ScalarExpr, TimeRangeKind};
use asap_types::workload::PlanningWorkload;
use system_bench::planeval::plan::{workload, Arm};

fn aggregate(node: &OperatorNode) -> Option<(&Reduction, &AggIntent, &OperatorNode)> {
let Operator::NonASAP(NonASAPOp::Aggregate {
Expand Down
Loading
Loading