@@ -66,7 +66,7 @@ def is_matching_dataset(primary_sheet, reference_sheet):
6666
6767
6868def  analyze_latency_stability (  # noqa: C901 
69-     primary_file , reference_file = None , output_dir = "stability_analysis_results" 
69+     primary_file , reference_file = None , output_dir = "stability_analysis_results" , debug = False 
7070):
7171    print (f"Analyzing latency stability from primary file: { primary_file }  )
7272    if  reference_file :
@@ -81,6 +81,9 @@ def analyze_latency_stability(  # noqa: C901
8181    primary_datasets  =  {}
8282    documents  =  read_excel_with_json_header (primary_file )
8383
84+     if  debug :
85+         print (f"[Debug Mode] Printing documents: { documents }  )
86+ 
8487    for  document  in  documents :
8588        sheetName  =  document .get ("sheetName" , None )
8689        df  =  document .get ("df" , None )
@@ -1547,11 +1550,17 @@ def main():
15471550        help = "Directory to save analysis results (default: stability_analysis_results)" ,
15481551    )
15491552
1553+     parser .add_argument (
1554+     "--debug" ,
1555+     action = "store_true" ,
1556+     help = "Enable debug mode (default: False)" ,
1557+     )
1558+ 
15501559    # Parse arguments 
15511560    args  =  parser .parse_args ()
15521561
15531562    # Run analysis 
1554-     analyze_latency_stability (args .primary_file , args .reference_file , args .output_dir )
1563+     analyze_latency_stability (args .primary_file , args .reference_file , args .output_dir ,  args . debug )
15551564
15561565
15571566if  __name__  ==  "__main__" :
0 commit comments