diff --git a/report/report_analysis/analyze_all.py b/report/report_analysis/analyze_all.py index ed7e91f3..b17e630a 100644 --- a/report/report_analysis/analyze_all.py +++ b/report/report_analysis/analyze_all.py @@ -97,7 +97,8 @@ def main(): # Read trace data trace_data = args.trace_data if args.sub_trace_data == '' else [args.trace_data, args.sub_trace_data] - lttng = read_trace_data(trace_data, args.start_strip, args.end_strip, False) + start_strip, end_strip = (0, 0) if args.find_valid_duration else (args.start_strip, args.end_strip ) + lttng = read_trace_data(trace_data, start_strip, end_strip, False) arch = Architecture('lttng', trace_data) # Create architecture for path analysis @@ -107,9 +108,9 @@ def main(): # Find duration to be analyzed # Run path analysis and find start point(sec) where the topic runs in the paths if args.find_valid_duration: - start_strip, end_strip = find_valid_duration.analyze(args, lttng, arch_path, app) - args.start_strip = start_strip - args.end_strip = end_strip + valid_start, valid_end = find_valid_duration.analyze(args, lttng, arch_path, app) + args.start_strip = valid_start + args.start_strip + args.end_strip = valid_end + args.end_strip logger.info(f'Find valid duration. start_strip: {args.start_strip}, end_strip: {args.end_strip}') logger.info(f'Reload trace data') lttng = read_trace_data(trace_data, args.start_strip, args.end_strip, False) diff --git a/report/report_validation/validate_all.py b/report/report_validation/validate_all.py index 096c8636..041de513 100644 --- a/report/report_validation/validate_all.py +++ b/report/report_validation/validate_all.py @@ -109,7 +109,8 @@ def main(): # Read trace data trace_data = args.trace_data if args.sub_trace_data == '' else [args.trace_data, args.sub_trace_data] - lttng = read_trace_data(trace_data, args.start_strip, args.end_strip, False) + start_strip, end_strip = (0, 0) if args.find_valid_duration else (args.start_strip, args.end_strip ) + lttng = read_trace_data(trace_data, start_strip, end_strip, False) arch = Architecture('lttng', trace_data) # Create architecture for path analysis @@ -119,9 +120,9 @@ def main(): # Find duration to be analyzed # Run path analysis and find start point(sec) where the topic runs in the paths if args.find_valid_duration: - start_strip, end_strip = find_valid_duration.analyze(args, lttng, arch_path, app) - args.start_strip = start_strip - args.end_strip = end_strip + valid_start, valid_end = find_valid_duration.analyze(args, lttng, arch_path, app) + args.start_strip = valid_start + args.start_strip + args.end_strip = valid_end + args.end_strip logger.info(f'Find valid duration. start_strip: {args.start_strip}, end_strip: {args.end_strip}') logger.info(f'Reload trace data') lttng = read_trace_data(trace_data, args.start_strip, args.end_strip, False)