Skip to content

Commit 4e154e1

Browse files
committed
fmt: Rename input_filename to trace_name
1 parent 42f1bf3 commit 4e154e1

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

drishti/handlers/handle_darshan.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,9 @@ def handler():
753753
display_footer(console, insights_start_time, insights_end_time)
754754

755755
# Export to HTML, SVG, and CSV
756-
input_filename = os.path.basename(args.log_path).replace('.darshan', '')
756+
trace_name = os.path.basename(args.log_path).replace('.darshan', '')
757757
out_dir = args.export_dir if args.export_dir != "" else os.getcwd()
758758

759-
export_html(console, out_dir, input_filename)
760-
export_svg(console, out_dir, input_filename)
761-
export_csv(out_dir, input_filename, job['job']['jobid'])
759+
export_html(console, out_dir, trace_name)
760+
export_svg(console, out_dir, trace_name)
761+
export_csv(out_dir, trace_name, job['job']['jobid'])

drishti/handlers/handle_recorder.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,11 @@ def process_helper(file_map, df_intervals, df_posix_records, fid=None):
580580
display_footer(console, insights_start_time, insights_end_time)
581581

582582
# Export to HTML, SVG, and CSV
583-
input_filename = os.path.basename(os.path.dirname(args.log_path))
583+
trace_name = os.path.basename(os.path.dirname(args.log_path))
584584
if args.split_files:
585-
input_filename = f"{input_filename}.{fid}"
585+
trace_name = f"{trace_name}.{fid}"
586586
out_dir = args.export_dir if args.export_dir != "" else os.getcwd()
587587

588-
export_html(console, out_dir, input_filename)
589-
export_svg(console, out_dir, input_filename)
590-
export_csv(out_dir, input_filename)
588+
export_html(console, out_dir, trace_name)
589+
export_svg(console, out_dir, trace_name)
590+
export_csv(out_dir, trace_name)

drishti/includes/module.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1824,12 +1824,12 @@ def display_footer(console, insights_start_time, insights_end_time):
18241824
)
18251825

18261826

1827-
def export_html(console, export_dir, filename):
1827+
def export_html(console, export_dir, trace_name):
18281828
if not args.export_html:
18291829
return
18301830

18311831
os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
1832-
filepath = os.path.join(export_dir, f"{filename}.html")
1832+
filepath = os.path.join(export_dir, f"{trace_name}.html")
18331833

18341834
console.save_html(
18351835
filepath,
@@ -1838,12 +1838,12 @@ def export_html(console, export_dir, filename):
18381838
)
18391839

18401840

1841-
def export_svg(console, export_dir, filename):
1841+
def export_svg(console, export_dir, trace_name):
18421842
if not args.export_svg:
18431843
return
18441844

18451845
os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
1846-
filepath = os.path.join(export_dir, f"{filename}.svg")
1846+
filepath = os.path.join(export_dir, f"{trace_name}.svg")
18471847

18481848
console.save_svg(
18491849
filepath,
@@ -1853,7 +1853,7 @@ def export_svg(console, export_dir, filename):
18531853
)
18541854

18551855

1856-
def export_csv(export_dir, filename, jobid=None):
1856+
def export_csv(export_dir, trace_name, jobid=None):
18571857
if not args.export_csv:
18581858
return
18591859

@@ -1903,7 +1903,7 @@ def export_csv(export_dir, filename, jobid=None):
19031903

19041904

19051905
os.makedirs(export_dir, exist_ok=True) # Ensure export directory exists
1906-
filepath = os.path.join(export_dir, f"{filename}.csv")
1906+
filepath = os.path.join(export_dir, f"{trace_name}.csv")
19071907

19081908
with open(filepath, 'w') as f:
19091909
w = csv.writer(f)

0 commit comments

Comments
 (0)