Skip to content

Commit 6108c98

Browse files
committed
Introduce lading_antithesis
I am gearing up to add Antithesis rig to this project, my rough goal being to eventually absorb and then expand on the existing integration test mechanism. There will be a couple of 'ducks' and 'sheepdog' in the project up-stack from this, I imagine. This new crate wraps the Antithesis Rust SDK and gives SUT assertions a more tidy appearance. This is ported from my work on Datadog/saluki.
1 parent 23ad8e3 commit 6108c98

5 files changed

Lines changed: 439 additions & 0 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ members = [
44
"integration/sheepdog",
55
"integration/ducks",
66
"lading",
7+
"lading_antithesis",
78
"lading_capture_schema",
89
"lading_capture",
910
"lading_fuzz",
@@ -69,6 +70,7 @@ ddsketch-agent = { git = "https://github.com/DataDog/saluki", rev = "f47a7ef588c
6970
datadog-protos = { git = "https://github.com/DataDog/saluki", rev = "f47a7ef588c53aa1da35dcfd93808595ebeb1291" }
7071
protobuf = { version = "3.7" }
7172
enum_dispatch = { version = "0.3" }
73+
antithesis_sdk = { git = "https://github.com/antithesishq/antithesis-sdk-rust", rev = "78c9db56771f0f6b01cb5404765c5a96852c159c", default-features = false } # 0.2.8 is pinned to rand 0.8, rev version allows us to select workspace rand
7274

7375
[workspace.lints.clippy]
7476
all = "deny"

lading_antithesis/Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "lading-antithesis"
3+
version = "0.1.0"
4+
authors = [
5+
"Brian L. Troutwine <brian.troutwine@datadoghq.com>",
6+
"George Hahn <george.hahn@datadoghq.com",
7+
]
8+
edition = "2024"
9+
license = "MIT"
10+
repository = "https://github.com/datadog/lading/"
11+
keywords = ["random_test", "generator"]
12+
categories = ["development-tools::profiling"]
13+
description = "A tool for load testing daemons."
14+
15+
[features]
16+
antithesis = ["dep:antithesis_sdk", "antithesis_sdk/full", "dep:serde_json"]
17+
18+
[dependencies]
19+
antithesis_sdk = { workspace = true, optional = true }
20+
serde_json = { workspace = true, optional = true }
21+
22+
[lib]
23+
doctest = false
24+
25+
[lints]
26+
workspace = true

lading_antithesis/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# lading-antithesis
2+
3+
A thin facade over the [Antithesis](https://antithesis.com) Rust SDK for the
4+
lading project. It owns the single `antithesis` cargo feature: with the feature
5+
off (the default) every macro is a no-op that elides its arguments unevaluated,
6+
so ordinary lading builds are unaffected; with it on, each macro forwards to the
7+
underlying SDK macro.
8+
9+
Both lading's SUT bootstrap (`lading/src/antithesis_hooks.rs`) and the Antithesis
10+
workload drivers under `antithesis/` reach the SDK through this crate, never
11+
`antithesis_sdk` directly, so an assertion reads identically wherever it lives.
12+
13+
Prefer the numeric macros (`always_gt!`, `always_le!`, ...) over
14+
`always!(x > y, ...)`: a more precise assertion gives Antithesis better
15+
exploration.

0 commit comments

Comments
 (0)