Skip to content

Commit f41e963

Browse files
authored
fixing utf-8 for html and add TMA version (#38)
1 parent cb0fef4 commit f41e963

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[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)
44

5-
PerfSpect is a system performance characterization tool built on top of linux perf. It contains two parts
5+
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:
66

77
perf-collect: Collects harware events
88

_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.11
1+
1.2.12

perf-collect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def validate_file(fname):
362362
start = time.time()
363363
subprocess.call(perfargs) # nosec
364364
end = time.time()
365-
if end - start < 5:
365+
if end - start < 5.2:
366366
logging.warning(
367367
"PerfSpect was run for less than 5 seconds, some events make be zero because they didn't get scheduled"
368368
)

perf-postprocess.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def write_html(time_series_df, perf_mode, out_file_path):
584584
crash("Unknown application type")
585585

586586
html = ""
587-
with open(html_file, "r") as f_html:
587+
with open(html_file, "r", encoding="utf-8") as f_html:
588588
html = f_html.read()
589589

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

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

624626

@@ -657,7 +659,7 @@ def generate_metrics(
657659
group_to_start_end_indexes = {}
658660
for time_slice, item in time_slice_groups:
659661
time_slice_float = float(time_slice)
660-
if time_slice_float - prev_time_slice < 5:
662+
if time_slice_float - prev_time_slice < 4.5:
661663
logging.warning("throwing out last sample because it was too short")
662664
continue
663665
time_slice_df = time_slice_groups.get_group(time_slice).copy()

release_notes

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)