Skip to content
Open
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
22 changes: 19 additions & 3 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ bencher_github_client = { path = "plus/bencher_github_client" }
bencher_google_client = { path = "plus/bencher_google_client" }
bencher_google_index = { path = "plus/bencher_google_index" }
bencher_license = { path = "plus/bencher_license" }
bencher_litestream = { path = "plus/bencher_litestream" }
bencher_otel = { path = "plus/bencher_otel" }
bencher_otel_provider = { path = "plus/bencher_otel_provider" }
bencher_oci_storage = { path = "plus/bencher_oci_storage" }
Expand Down
3 changes: 2 additions & 1 deletion docker/bench.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ RUN cargo init --lib bencher_recaptcha
RUN cargo init --lib bencher_rootfs
RUN cargo init --lib bencher_runner
RUN cargo init --lib bencher_init
COPY plus/bencher_litestream bencher_litestream

WORKDIR /usr/src/bencher/tasks
RUN cargo init --bin bin_version
Expand Down Expand Up @@ -90,7 +91,7 @@ RUN cargo init runner
COPY services/api/openapi.json /usr/src/bencher/services/api/openapi.json

WORKDIR /usr/src/bencher
RUN cargo bench --package bencher_adapter --no-run --message-format=json \
RUN cargo bench --package bencher_adapter --no-run --features server --message-format=json \
| jq -r 'select(.executable != null and .target.kind == ["bench"]) | .executable' \
| xargs -I {} cp {} /usr/local/bin/bench-adapter

Expand Down
4 changes: 3 additions & 1 deletion lib/bencher_adapter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ publish = false

[features]
default = []
client = ["bencher_json/client"]
server = ["bencher_json/server"]
plus = ["bencher_json/plus"]

[dependencies]
bencher_json = { workspace = true, features = ["server"] }
bencher_json.workspace = true
literally.workspace = true
nom.workspace = true
ordered-float.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions lib/bencher_config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ default = []
plus = [
"dep:bencher_github_client",
"dep:bencher_google_client",
"dep:bencher_litestream",
"dep:bencher_oci_storage",
"bencher_billing/plus",
"bencher_endpoint/plus",
Expand All @@ -30,6 +31,7 @@ bencher_github_client = { workspace = true, optional = true }
bencher_google_client = { workspace = true, optional = true }
bencher_json.workspace = true
bencher_license = { workspace = true, optional = true }
bencher_litestream = { workspace = true, optional = true }
bencher_oci_storage = { workspace = true, optional = true }
bencher_rbac.workspace = true
bencher_recaptcha = { workspace = true, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion lib/bencher_config/src/config_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ fn run_litestream(database: &mut DbConnection) -> Result<(), ConfigTxError> {
// https://litestream.io/tips/#disable-autocheckpoints-for-high-write-load-servers
// https://sqlite.org/wal.html#automatic_checkpoint
database
.batch_execute("PRAGMA wal_autocheckpoint = 0")
.batch_execute(bencher_litestream::DISABLE_AUTOCHECKPOINT_PRAGMA)
.map_err(ConfigTxError::Pragma)?;

Ok(())
Expand Down
20 changes: 11 additions & 9 deletions lib/bencher_json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ publish = false

[features]
default = []
client = ["bencher_context/client", "bencher_valid/client"]
client = ["bencher_context/client", "bencher_valid/client", "bencher_litestream?/client"]
table = ["dep:tabled"]
server = ["bencher_context/server", "bencher_valid/server"]
schema = ["dep:schemars", "bencher_context/schema", "ordered-float/schemars"]
db = ["dep:diesel", "dep:serde_yaml", "bencher_valid/db"]
plus = ["dep:camino", "bencher_valid/plus"]
server = ["bencher_context/server", "bencher_valid/server", "bencher_litestream?/server"]
schema = [
"dep:schemars",
"bencher_context/schema",
"ordered-float/schemars",
"bencher_litestream?/schema",
]
db = ["dep:diesel", "bencher_valid/db", "bencher_litestream?/yaml"]
plus = ["dep:camino", "dep:bencher_litestream", "bencher_valid/plus"]
test-clock = ["bencher_valid/test-clock"]

[dependencies]
bencher_context.workspace = true
bencher_litestream = { workspace = true, optional = true }
bencher_valid = { workspace = true, features = ["schema"] }
camino = { workspace = true, features = ["serde1"], optional = true }
derive_more.workspace = true
Expand All @@ -28,15 +34,11 @@ schemars = { workspace = true, optional = true, features = ["chrono", "url"] }
serde.workspace = true
serde_json.workspace = true
serde_urlencoded.workspace = true
serde_yaml = { workspace = true, optional = true }
tabled = { workspace = true, optional = true }
thiserror.workspace = true
typeshare.workspace = true
url = { workspace = true, features = ["serde"] }
uuid = { workspace = true, features = ["v4", "serde"] }

[dev-dependencies]
pretty_assertions.workspace = true

[lints]
workspace = true
2 changes: 0 additions & 2 deletions lib/bencher_json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ pub use bencher_valid::{
#[cfg(feature = "schema")]
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[cfg(all(not(feature = "plus"), feature = "db"))]
use serde_yaml as _;

mod auth;
pub mod big_int;
Expand Down
Loading
Loading