T-137: M2.3c — tools/curate-etl: pure QuestDB ILP v2 encoder + sharded batch writer for bars_1m / fx_1m over injected Write sinks (no new crates, no live QuestDB)
This commit is contained in:
parent
bcf2067c8d
commit
c6e6b796a4
7 changed files with 1565 additions and 4 deletions
|
|
@ -46,6 +46,7 @@ fn no_args_and_help_print_usage_and_succeed() {
|
|||
"{args:?}: {text}"
|
||||
);
|
||||
assert!(text.contains("bench-split"), "{args:?}: {text}");
|
||||
assert!(text.contains("bench-ilp-bars-1m"), "{args:?}: {text}");
|
||||
assert!(text.contains("bench-corporate-actions"), "{args:?}: {text}");
|
||||
assert!(text.contains("bench-fx"), "{args:?}: {text}");
|
||||
assert!(text.contains("bench-events"), "{args:?}: {text}");
|
||||
|
|
@ -90,6 +91,10 @@ fn invalid_invocations_exit_nonzero_with_usage_on_stderr() {
|
|||
&["bench-curate-fx", "0"][..],
|
||||
&["bench-curate-fx", "-5"][..],
|
||||
&["bench-curate-fx", "10", "20"][..],
|
||||
&["bench-ilp-bars-1m", "abc"][..],
|
||||
&["bench-ilp-bars-1m", "0"][..],
|
||||
&["bench-ilp-bars-1m", "-5"][..],
|
||||
&["bench-ilp-bars-1m", "10", "20"][..],
|
||||
&["--unknown"][..],
|
||||
&["export"][..],
|
||||
] {
|
||||
|
|
@ -260,6 +265,33 @@ fn bench_curate_fx_small_run_is_headless_deterministic_and_reports_rates() {
|
|||
assert_eq!(field(&text_a, "bytes="), field(&text_b, "bytes="));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn bench_ilp_bars_1m_small_run_is_headless_deterministic_and_reports_rates() {
|
||||
let a = run(&["bench-ilp-bars-1m", "2000"]);
|
||||
let b = run(&["bench-ilp-bars-1m", "2000"]);
|
||||
assert!(a.status.success(), "{}", stderr(&a));
|
||||
assert!(b.status.success(), "{}", stderr(&b));
|
||||
assert!(stderr(&a).is_empty(), "unexpected stderr: {}", stderr(&a));
|
||||
assert!(stderr(&b).is_empty(), "unexpected stderr: {}", stderr(&b));
|
||||
|
||||
let text_a = stdout(&a);
|
||||
let text_b = stdout(&b);
|
||||
assert!(text_a.contains("curate-etl bench-ilp-bars-1m"), "{text_a}");
|
||||
assert!(text_a.contains("rows=2000 "), "{text_a}");
|
||||
assert!(text_a.contains("rows_encoded=2000 "), "{text_a}");
|
||||
assert!(text_a.contains("rows/s"), "{text_a}");
|
||||
assert!(text_a.contains("bytes/row"), "{text_a}");
|
||||
assert!(text_a.contains("MB/s"), "{text_a}");
|
||||
|
||||
let field = |s: &str, prefix: &str| {
|
||||
s.split_whitespace()
|
||||
.find(|t| t.starts_with(prefix))
|
||||
.map(str::to_owned)
|
||||
};
|
||||
assert_eq!(field(&text_a, "bytes="), field(&text_b, "bytes="));
|
||||
assert_eq!(field(&text_a, "flushes="), field(&text_b, "flushes="));
|
||||
}
|
||||
|
||||
static CLI_TEST_DIR_SEQ: AtomicU64 = AtomicU64::new(0);
|
||||
|
||||
struct CliTempDir {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue