Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Feb 20, 2024
1 parent b5ce361 commit 6a7492e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
{
cat /tmp/table.md
echo "<details><summary>Click to see raw report</summary>"
echo
echo "\`\`\`"
cat /tmp/perf.txt
echo "\`\`\`"
Expand Down
6 changes: 3 additions & 3 deletions rust/bench/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ def load_yaml(input_file):
with open(input_file, 'r') as f:
data = yaml.safe_load(f)["benches"]

print("| Name | Max Memory | Encode | Decode |")
print("| Name | Max Mem(Kb) | Encode | Decode |")
print("| --- | --- | --- | --- |")
for name in data.keys():
if name not in special_benchmarks:
scope = data[name]["scopes"]
mem = data[name]["total"]["heap_increase"] * 64 / 1024
mem = data[name]["total"]["heap_increase"] * 64
encode = scope["1. Encoding"]["instructions"]
decode = scope["2. Decoding"]["instructions"]
print(f"| {name} | {mem:.2f} | {encode:_} | {decode:_} |")
print(f"| {name} | {mem:_} | {encode:_} | {decode:_} |")

print()
print(f"* Parser cost: {data['nns']['scopes']['0. Parsing']['instructions']:_}")
Expand Down

0 comments on commit 6a7492e

Please sign in to comment.