Skip to content

Commit

Permalink
fix: apply strip time to valid_duration
Browse files Browse the repository at this point in the history
Signed-off-by: takeshi.iwanari <[email protected]>
  • Loading branch information
iwatake2222 committed Nov 20, 2024
1 parent 600c958 commit 622387e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions report/report_analysis/analyze_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions report/report_validation/validate_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 622387e

Please sign in to comment.