Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9879a0eb25 | ||
|
|
03c19ef7c6 | ||
|
|
2540801140 | ||
|
|
dd28fa233c | ||
|
|
e5ca519df0 | ||
|
|
06c8e01eb5 | ||
|
|
990439985d | ||
|
|
54136b71ef | ||
|
|
5d18304f0f | ||
|
|
8bbf844bb6 | ||
|
|
97607a0a91 |
@@ -1,6 +1,6 @@
|
||||
# alkane-toolkit
|
||||
|
||||
[](https://gitea.bluefla.re/blueflare/alkane-toolkit/actions)
|
||||
[](https://gitea.bluefla.re/blueflare/alkane-toolkit/actions)
|
||||

|
||||

|
||||

|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"bench_parse_line_near_max_addrs": 807160.0,
|
||||
"bench_parse_targets_many_ranges_near_cap": 54465485.0,
|
||||
"bench_render_cells": 3503112.0,
|
||||
"bench_sort_by_each_column": 486975.0,
|
||||
"bench_targets_to_cidrs_large_range": 482167.0,
|
||||
"bench_upsert_cold_start_population": 8315814.0,
|
||||
"bench_view_pipeline": 191794.0,
|
||||
"bench_view_pipeline_default_sort": 193214.0,
|
||||
"bench_view_pipeline_with_filter": 253085.0
|
||||
"bench_parse_line_near_max_addrs": 644187.0,
|
||||
"bench_parse_targets_many_ranges_near_cap": 49565223.0,
|
||||
"bench_render_cells": 3037944.0,
|
||||
"bench_sort_by_each_column": 816884.0,
|
||||
"bench_targets_to_cidrs_large_range": 443875.0,
|
||||
"bench_upsert_cold_start_population": 8871040.0,
|
||||
"bench_view_pipeline": 177652.0,
|
||||
"bench_view_pipeline_default_sort": 203830.0,
|
||||
"bench_view_pipeline_with_filter": 187371.0
|
||||
}
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128.0" height="20" role="img" aria-label="bench coverage: 7%">
|
||||
<title>bench coverage: 7%</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="160.5" height="20" role="img" aria-label="bench coverage: pending">
|
||||
<title>bench coverage: pending</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r"><rect width="128.0" height="20" rx="3" fill="#fff"/></clipPath>
|
||||
<clipPath id="r"><rect width="160.5" height="20" rx="3" fill="#fff"/></clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="103.0" height="20" fill="#555"/>
|
||||
<rect x="103.0" width="25.0" height="20" fill="#e05d44"/>
|
||||
<rect width="128.0" height="20" fill="url(#s)"/>
|
||||
<rect x="103.0" width="57.5" height="20" fill="#9f9f9f"/>
|
||||
<rect width="160.5" height="20" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
|
||||
<text x="51.5" y="15" fill="#010101" fill-opacity=".3">bench coverage</text>
|
||||
<text x="51.5" y="14">bench coverage</text>
|
||||
<text x="115.5" y="15" fill="#010101" fill-opacity=".3">7%</text>
|
||||
<text x="115.5" y="14">7%</text>
|
||||
<text x="131.8" y="15" fill="#010101" fill-opacity=".3">pending</text>
|
||||
<text x="131.8" y="14">pending</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 946 B After Width: | Height: | Size: 966 B |
+7
-7
@@ -1,19 +1,19 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="141.0" height="20" role="img" aria-label="bench: +7.4% vs prev">
|
||||
<title>bench: +7.4% vs prev</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="147.5" height="20" role="img" aria-label="bench: -79.9% vs prev">
|
||||
<title>bench: -79.9% vs prev</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="r"><rect width="141.0" height="20" rx="3" fill="#fff"/></clipPath>
|
||||
<clipPath id="r"><rect width="147.5" height="20" rx="3" fill="#fff"/></clipPath>
|
||||
<g clip-path="url(#r)">
|
||||
<rect width="44.5" height="20" fill="#555"/>
|
||||
<rect x="44.5" width="96.5" height="20" fill="#dfb317"/>
|
||||
<rect width="141.0" height="20" fill="url(#s)"/>
|
||||
<rect x="44.5" width="103.0" height="20" fill="#4c1"/>
|
||||
<rect width="147.5" height="20" fill="url(#s)"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
|
||||
<text x="22.2" y="15" fill="#010101" fill-opacity=".3">bench</text>
|
||||
<text x="22.2" y="14">bench</text>
|
||||
<text x="92.8" y="15" fill="#010101" fill-opacity=".3">+7.4% vs prev</text>
|
||||
<text x="92.8" y="14">+7.4% vs prev</text>
|
||||
<text x="96.0" y="15" fill="#010101" fill-opacity=".3">-79.9% vs prev</text>
|
||||
<text x="96.0" y="14">-79.9% vs prev</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 950 B After Width: | Height: | Size: 952 B |
+4
-4
@@ -1,5 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="141.0" height="20" role="img" aria-label="lines of code: 13.7K">
|
||||
<title>lines of code: 13.7K</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="141.0" height="20" role="img" aria-label="lines of code: 13.7k">
|
||||
<title>lines of code: 13.7k</title>
|
||||
<linearGradient id="s" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
@@ -13,7 +13,7 @@
|
||||
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" font-size="11">
|
||||
<text x="48.2" y="15" fill="#010101" fill-opacity=".3">lines of code</text>
|
||||
<text x="48.2" y="14">lines of code</text>
|
||||
<text x="118.8" y="15" fill="#010101" fill-opacity=".3">13.7K</text>
|
||||
<text x="118.8" y="14">13.7K</text>
|
||||
<text x="118.8" y="15" fill="#010101" fill-opacity=".3">13.7k</text>
|
||||
<text x="118.8" y="14">13.7k</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |
+1
-1
@@ -31,7 +31,7 @@ import sys
|
||||
# trailing (?![a-zA-Z]) stops "s" in words like "rows"/"cidrs" from matching.
|
||||
_DUR = re.compile(r"([0-9]+(?:\.[0-9]+)?)\s*(ns|µs|us|ms|s)(?![a-zA-Z])")
|
||||
_UNIT_NS = {"ns": 1.0, "us": 1e3, "µs": 1e3, "ms": 1e6, "s": 1e9}
|
||||
_NAME = re.compile(r"^(?:test [A-Za-z0-9_:]+ \.\.\. )?(bench_[A-Za-z0-9_]+)\s*:")
|
||||
_NAME = re.compile(r"^(bench_[A-Za-z0-9_]+)\s*:")
|
||||
|
||||
|
||||
def parse_bench(text: str) -> dict:
|
||||
|
||||
@@ -7,23 +7,10 @@ from pathlib import Path
|
||||
import unittest
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
from bench_history import bench_badge, previous_measurement, render_html, updated_index
|
||||
from bench_history import previous_measurement, render_html, updated_index
|
||||
|
||||
|
||||
class HistoryTests(unittest.TestCase):
|
||||
def test_cargo_nocapture_benchmark_lines_are_parsed(self):
|
||||
output = (
|
||||
"test tests::bench_verify_artifact ... bench_verify_artifact: 208.302µs\n"
|
||||
"test model::tests::bench_render_cells ... bench_render_cells: "
|
||||
"5000 rows x 10 cols = 8.007185ms/full-render (bytes=13553600)\n"
|
||||
"bench_direct: 12ns/op\n"
|
||||
)
|
||||
self.assertEqual(bench_badge.parse_bench(output), {
|
||||
"bench_verify_artifact": 208_302.0,
|
||||
"bench_render_cells": 8_007_185.0,
|
||||
"bench_direct": 12.0,
|
||||
})
|
||||
|
||||
def test_retry_uses_previous_commit(self):
|
||||
first = "a" * 40
|
||||
second = "b" * 40
|
||||
|
||||
Reference in New Issue
Block a user