Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
Signed-off-by: JoseSantosAMD <Jose.Santos@amd.com>
  • Loading branch information
JoseSantosAMD committed Aug 3, 2023
1 parent b62197f commit 3e39f55
Showing 1 changed file with 68 additions and 24 deletions.
92 changes: 68 additions & 24 deletions src/omniperf_analyze/utils/tty.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,113 +159,157 @@ def show_all(args, runs, archConfigs, output):
]
if not curr_row.empty:
if "Value" in curr_row:
if isinstance(curr_row["Value"][0], float):
if curr_row.Value[0] < 0.001:
if isinstance(
curr_row["Value"][0],
float,
):
if (
curr_row.Value[0]
< 0.001
):
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Unit",
] = "Kb/s"
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Value",
] = (
1000000
* curr_row.Value
)
elif curr_row.Value[0] < 1:
elif (
curr_row.Value[0] < 1
):
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Unit",
] = "Mb/s"
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Value",
] = (
1000 * curr_row.Value
1000
* curr_row.Value
)
elif "Avg" in curr_row:
if isinstance(curr_row["Avg"][0], float):
if curr_row.Avg[0] < 0.001:
if isinstance(
curr_row["Avg"][0], float
):
if (
curr_row.Avg[0]
< 0.001
):
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Unit",
] = "Kb/s"
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Avg",
] = (
1000000 * curr_row.Avg
1000000
* curr_row.Avg
)
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Min",
] = (
1000000 * curr_row.Min
1000000
* curr_row.Min
)
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Max",
] = (
1000000 * curr_row.Max
1000000
* curr_row.Max
)
elif curr_row.Avg[0] < 1:
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Unit",
] = "Mb/s"
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Avg",
] = (
1000 * curr_row.Avg
1000
* curr_row.Avg
)
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Min",
] = (
1000 * curr_row.Min
1000
* curr_row.Min
)
cur_df.loc[
(
cur_df["Metric"]
cur_df[
"Metric"
]
== curr_metric
),
"Max",
] = (
1000 * curr_row.Max
1000
* curr_row.Max
)
df = pd.concat([df, cur_df[header]], axis=1)

Expand Down

0 comments on commit 3e39f55

Please sign in to comment.