Skip to content

Commit

Permalink
Update on "[ET] Add tsv_path to inspector_cli"
Browse files Browse the repository at this point in the history
Differential Revision: [D66379005](https://our.internmc.facebook.com/intern/diff/D66379005/)

[ghstack-poisoned]
  • Loading branch information
jorgep31415 committed Nov 22, 2024
1 parent fce5c49 commit 507a99f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions devtools/inspector/_inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1174,12 +1174,12 @@ def print_data_tabular(
display_or_print_df(filtered_column_df, file)


def save_data_to_csv(
def save_data_to_tsv(
self,
file: IO[str],
) -> None:
"""
Stores the underlying EventBlocks in a csv format with tab separator, to facilitate copy-paste into spreadsheets.
Stores the underlying EventBlocks in tsv format to facilitate copy-paste into spreadsheets.
Args:
file: Which IO stream to print to. Do not use stdout, as tab separator is not preserved.
Expand Down
8 changes: 4 additions & 4 deletions devtools/inspector/inspector_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def main() -> None:
help="Provide an optional buffer file path.",
)
parser.add_argument(
"--csv_path",
"--tsv_path",
required=False,
help="Provide an optional csv file path.",
help="Provide an optional tsv file path.",
)
parser.add_argument("--compare_results", action="store_true")

Expand All @@ -60,8 +60,8 @@ def main() -> None:
target_time_scale=TimeScale(args.target_time_scale),
)
inspector.print_data_tabular()
if args.csv_path:
inspector.save_data_to_csv(args.csv_path)
if args.tsv_path:
inspector.save_data_to_tsv(args.tsv_path)
if args.compare_results:
for event_block in inspector.event_blocks:
if event_block.name == "Execute":
Expand Down

0 comments on commit 507a99f

Please sign in to comment.