MCPcopy Create free account
hub / github.com/apache/datafusion / test_cli_top_memory_consumers

Function test_cli_top_memory_consumers

datafusion-cli/tests/cli_integration.rs:215–227  ·  view source on GitHub ↗
(
    #[case] snapshot_name: &str,
    #[case] top_memory_consumers: impl IntoIterator<Item = &'a str>,
)

Source from the content-addressed store, hash-verified

213#[case("top3_default", [])]
214#[test]
215fn test_cli_top_memory_consumers<'a>(
216 #[case] snapshot_name: &str,
217 #[case] top_memory_consumers: impl IntoIterator<Item = &'a str>,
218) {
219 let _bound = bind_to_settings(snapshot_name);
220
221 let mut cmd = cli();
222 let sql = "select * from generate_series(1,500000) as t1(v1) order by v1 desc;";
223 cmd.args(["--memory-limit", "10M", "--command", sql]);
224 cmd.args(top_memory_consumers);
225
226 assert_cmd_snapshot!(cmd);
227}
228
229#[rstest]
230#[case("no_track", ["--top-memory-consumers", "0"])]

Callers

nothing calls this directly

Calls 3

bind_to_settingsFunction · 0.85
cliFunction · 0.70
argsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…