Skip to content

Commit

Permalink
fixing utf-8 for html and add TMA version (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
hilldani authored Jun 5, 2023
1 parent cb0fef4 commit f41e963
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Quick Start](#quick-start-requires-perf-installed) | [Output](#output) | [Requirements](#requirements) | [Build from source](#build-from-source) | [Caveats](#caveats) | [How to contribute](#how-to-contribute)

PerfSpect is a system performance characterization tool built on top of linux perf. It contains two parts
PerfSpect is a system performance characterization tool built on top of linux perf. Most metrics and events come from [perfmon](https://github.com/intel/perfmon) and [TMA v4.5](https://www.intel.com/content/www/us/en/docs/vtune-profiler/cookbook/2023-1/top-down-microarchitecture-analysis-method.html). It contains two parts:

perf-collect: Collects harware events

Expand Down
2 changes: 1 addition & 1 deletion _version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.11
1.2.12
2 changes: 1 addition & 1 deletion perf-collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def validate_file(fname):
start = time.time()
subprocess.call(perfargs) # nosec
end = time.time()
if end - start < 5:
if end - start < 5.2:
logging.warning(
"PerfSpect was run for less than 5 seconds, some events make be zero because they didn't get scheduled"
)
Expand Down
8 changes: 5 additions & 3 deletions perf-postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def write_html(time_series_df, perf_mode, out_file_path):
crash("Unknown application type")

html = ""
with open(html_file, "r") as f_html:
with open(html_file, "r", encoding="utf-8") as f_html:
html = f_html.read()

# only show TMA if system-wide mode
Expand Down Expand Up @@ -618,7 +618,9 @@ def write_html(time_series_df, perf_mode, out_file_path):
]:
html = html.replace(number[0], str(avg.loc[number[1], 0]))

with open(os.path.splitext(out_file_path)[0] + ".html", "w") as file:
with open(
os.path.splitext(out_file_path)[0] + ".html", "w", encoding="utf-8"
) as file:
file.write(html)


Expand Down Expand Up @@ -657,7 +659,7 @@ def generate_metrics(
group_to_start_end_indexes = {}
for time_slice, item in time_slice_groups:
time_slice_float = float(time_slice)
if time_slice_float - prev_time_slice < 5:
if time_slice_float - prev_time_slice < 4.5:
logging.warning("throwing out last sample because it was too short")
continue
time_slice_df = time_slice_groups.get_group(time_slice).copy()
Expand Down
12 changes: 0 additions & 12 deletions release_notes

This file was deleted.

0 comments on commit f41e963

Please sign in to comment.