Loading scripts/find_regressions_from_logs2.py→scripts/detect_regressions.py +4 −28 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ import pandas as pd import plotly.graph_objects as go from plotly.subplots import make_subplots def main(logs_dir, output_filename, measure, days, all_results, diff_thr, ratio_thr, curr_value_thr): def main(logs_dir, output_filename, measure, days): input_path = Path(logs_dir) logs = [f for f in input_path.iterdir() if f.is_dir()] Loading Loading @@ -83,7 +83,7 @@ def main(logs_dir, output_filename, measure, days, all_results, diff_thr, ratio_ # Store worst case per format for plotting for f in formats: plotdata.loc[f, currdate] = ratio.iloc[idx[f]][currdate] plottext.loc[f, currdate] = f"{result.iloc[idx[f]]['job']} - {result.iloc[idx[f]]['testcase']} - Max {measure} ratio: {ratio.iloc[idx[f]][currdate]:.2f}<br>Date: {currdate}" plottext.loc[f, currdate] = f"Job: {result.iloc[idx[f]]['job']}<br>Testcase: {result.iloc[idx[f]]['testcase']} <br>Max {measure} ratio: {ratio.iloc[idx[f]][currdate]:.2f}<br>Date: {currdate}" fig = make_subplots( rows=5, Loading Loading @@ -132,7 +132,7 @@ if __name__ == "__main__": parser.add_argument( "output_filename", type=str, help="Filename of the combined csv file. e.g mld.csv", help="Output html file. e.g mld.html", ) parser.add_argument( "--measure", Loading @@ -146,32 +146,8 @@ if __name__ == "__main__": help="Number of days in history, (default: whole history)", default=-1, ) parser.add_argument( "--all_results", action="store_true", help="Output all results, including cases without regression (default: off)", default=False, ) parser.add_argument( "--diff_thr", type=float, help="Include test cases with diff above diff_thr, (default: 0.0)", default=0.0, ) parser.add_argument( "--ratio_thr", type=float, help="Include test cases with ratio above ratio_thr, (default: 1.0)", default=1.0, ) parser.add_argument( "--curr_value_thr", type=float, help="Include test cases with curr_value above curr_value_thr, (default: 0.0)", default=0.0, ) args = parser.parse_args() main(args.logs_dir, args.output_filename, args.measure, args.days, args.all_results, args.diff_thr, args.ratio_thr, args.curr_value_thr) main(args.logs_dir, args.output_filename, args.measure, args.days) Loading
scripts/find_regressions_from_logs2.py→scripts/detect_regressions.py +4 −28 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ import pandas as pd import plotly.graph_objects as go from plotly.subplots import make_subplots def main(logs_dir, output_filename, measure, days, all_results, diff_thr, ratio_thr, curr_value_thr): def main(logs_dir, output_filename, measure, days): input_path = Path(logs_dir) logs = [f for f in input_path.iterdir() if f.is_dir()] Loading Loading @@ -83,7 +83,7 @@ def main(logs_dir, output_filename, measure, days, all_results, diff_thr, ratio_ # Store worst case per format for plotting for f in formats: plotdata.loc[f, currdate] = ratio.iloc[idx[f]][currdate] plottext.loc[f, currdate] = f"{result.iloc[idx[f]]['job']} - {result.iloc[idx[f]]['testcase']} - Max {measure} ratio: {ratio.iloc[idx[f]][currdate]:.2f}<br>Date: {currdate}" plottext.loc[f, currdate] = f"Job: {result.iloc[idx[f]]['job']}<br>Testcase: {result.iloc[idx[f]]['testcase']} <br>Max {measure} ratio: {ratio.iloc[idx[f]][currdate]:.2f}<br>Date: {currdate}" fig = make_subplots( rows=5, Loading Loading @@ -132,7 +132,7 @@ if __name__ == "__main__": parser.add_argument( "output_filename", type=str, help="Filename of the combined csv file. e.g mld.csv", help="Output html file. e.g mld.html", ) parser.add_argument( "--measure", Loading @@ -146,32 +146,8 @@ if __name__ == "__main__": help="Number of days in history, (default: whole history)", default=-1, ) parser.add_argument( "--all_results", action="store_true", help="Output all results, including cases without regression (default: off)", default=False, ) parser.add_argument( "--diff_thr", type=float, help="Include test cases with diff above diff_thr, (default: 0.0)", default=0.0, ) parser.add_argument( "--ratio_thr", type=float, help="Include test cases with ratio above ratio_thr, (default: 1.0)", default=1.0, ) parser.add_argument( "--curr_value_thr", type=float, help="Include test cases with curr_value above curr_value_thr, (default: 0.0)", default=0.0, ) args = parser.parse_args() main(args.logs_dir, args.output_filename, args.measure, args.days, args.all_results, args.diff_thr, args.ratio_thr, args.curr_value_thr) main(args.logs_dir, args.output_filename, args.measure, args.days)