@@ -29,15 +29,16 @@ def test_file_based_integration(tmp_path):
2929 Tests the full baseline and analyze pipeline using file-based data.
3030 """
3131 # Define paths
32- data_file = "data/example.json"
32+ baseline_data = "data/example.json"
33+ analyze_data = "data/example2.bz2"
3334 baseline_output_dir = tmp_path / "baseline_output"
3435 analyze_output_dir = tmp_path / "analyze_output"
3536
3637 # --- Baseline generation ---
3738 baseline_cmd = [
3839 sys .executable ,
3940 "main.py" ,
40- data_file ,
41+ baseline_data ,
4142 "-m" ,
4243 "baseline" ,
4344 "-o" ,
@@ -61,18 +62,46 @@ def test_file_based_integration(tmp_path):
6162 analyze_cmd = [
6263 sys .executable ,
6364 "main.py" ,
64- data_file ,
65+ analyze_data ,
6566 "-m" ,
6667 "analyze" ,
6768 "-i" ,
6869 str (baseline_file ),
6970 "-o" ,
7071 str (analyze_output_dir ),
72+ "--path-stats" ,
73+ "--source-type" ,
74+ "probe" ,
75+ "--source-id" ,
76+ "1012770" ,
77+ "--dest-radius" ,
78+ "45.411974347371476,2.716824328216018:2000" ,
79+ "--dest-id" ,
80+ "1012763" ,
7181 "--plot-metrics" ,
7282 "rtt" ,
83+ "rtt_std" ,
84+ "first_hop_rtt" ,
85+ "observed_pathlen" ,
86+ "successful_pathlen" ,
87+ "duration" ,
88+ "timeouts" ,
89+ "success_rate" ,
90+ "timeout_rate" ,
7391 "--plot-types" ,
92+ "hist" ,
7493 "scatter" ,
94+ "rolling" ,
95+ "boxplot" ,
96+ "--plot-aggregations" ,
97+ "daily" ,
98+ "hourly" ,
99+ "dayofweek" ,
100+ "hourofday" ,
101+ "--formats" ,
102+ "png" ,
75103 "--no-line-count" ,
104+ "--highlight-outliers" ,
76105 ]
77106 analyze_result = subprocess .run (analyze_cmd , capture_output = True , text = True )
78107 assert analyze_result .returncode == 0 , f"Analysis run failed: { analyze_result .stderr } "
@@ -104,7 +133,7 @@ def test_clickhouse_based_integration(tmp_path):
104133
105134 # --- Analysis run from ClickHouse ---
106135 analyze_output_dir = tmp_path / "ch_analyze_output"
107- analyze_cmd = [sys .executable , "main.py" , "--clickhouse" , "-m" , "analyze" , "-i" , str (baseline_file ), "-o" , str (analyze_output_dir )]
136+ analyze_cmd = [sys .executable , "main.py" , "--clickhouse" , "-m" , "analyze" , "--path-stats" , "--analyze-core-paths" , "- i" , str (baseline_file ), "-o" , str (analyze_output_dir )]
108137 subprocess .run (analyze_cmd , check = True )
109138 analysis_files = list (analyze_output_dir .glob ("*.json" ))
110139 assert len (analysis_files ) == 1 , "Expected one analysis JSON file from ClickHouse"
0 commit comments