Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion go-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ fn collect_walltime_results(bench_name_to_path: HashMap<String, PathBuf>) -> any
let mut benchmarks_by_pid: HashMap<u32, Vec<results::walltime_results::WalltimeBenchmark>> =
HashMap::new();
for raw in raw_results {
// We only parse the `func Benchmark*` name which is the first part of the URI
let func_name = raw
.benchmark_name
.split("::")
.next()
.unwrap_or(&raw.benchmark_name);
let file_path = bench_name_to_path
.get(&raw.benchmark_name)
.get(func_name)
.map(|p| p.to_string_lossy().to_string());
benchmarks_by_pid
.entry(raw.pid)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: src/integration_tests.rs
source: go-runner/src/integration_tests.rs
expression: content
---
{
Expand Down Expand Up @@ -69,7 +69,7 @@ expression: content
},
{
"name": "BenchmarkContainsMethods::Bytes.Contains",
"uri": "unknown::BenchmarkContainsMethods::Bytes.Contains",
"uri": "contains/contains_test.go::BenchmarkContainsMethods::Bytes.Contains",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -80,7 +80,7 @@ expression: content
},
{
"name": "BenchmarkContainsMethods::RegexMatch",
"uri": "unknown::BenchmarkContainsMethods::RegexMatch",
"uri": "contains/contains_test.go::BenchmarkContainsMethods::RegexMatch",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -91,7 +91,7 @@ expression: content
},
{
"name": "BenchmarkContainsMethods::RegexMatchString",
"uri": "unknown::BenchmarkContainsMethods::RegexMatchString",
"uri": "contains/contains_test.go::BenchmarkContainsMethods::RegexMatchString",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -102,7 +102,7 @@ expression: content
},
{
"name": "BenchmarkContainsMethods::Strings.Contains",
"uri": "unknown::BenchmarkContainsMethods::Strings.Contains",
"uri": "contains/contains_test.go::BenchmarkContainsMethods::Strings.Contains",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: src/integration_tests.rs
source: go-runner/src/integration_tests.rs
expression: content
---
{
Expand All @@ -14,7 +14,7 @@ expression: content
"benchmarks": [
{
"name": "BenchmarkConcat::Buffer",
"uri": "unknown::BenchmarkConcat::Buffer",
"uri": "concat/concat_test.go::BenchmarkConcat::Buffer",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -25,7 +25,7 @@ expression: content
},
{
"name": "BenchmarkConcat::Builder",
"uri": "unknown::BenchmarkConcat::Builder",
"uri": "concat/concat_test.go::BenchmarkConcat::Builder",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -36,7 +36,7 @@ expression: content
},
{
"name": "BenchmarkConcat::String",
"uri": "unknown::BenchmarkConcat::String",
"uri": "concat/concat_test.go::BenchmarkConcat::String",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: src/integration_tests.rs
source: go-runner/src/integration_tests.rs
expression: content
---
{
Expand Down Expand Up @@ -36,7 +36,7 @@ expression: content
},
{
"name": "BenchmarkWhereOps::eq",
"uri": "unknown::BenchmarkWhereOps::eq",
"uri": "tpl/collections/where_test.go::BenchmarkWhereOps::eq",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -47,7 +47,7 @@ expression: content
},
{
"name": "BenchmarkWhereOps::like",
"uri": "unknown::BenchmarkWhereOps::like",
"uri": "tpl/collections/where_test.go::BenchmarkWhereOps::like",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -58,7 +58,7 @@ expression: content
},
{
"name": "BenchmarkWhereOps::ne",
"uri": "unknown::BenchmarkWhereOps::ne",
"uri": "tpl/collections/where_test.go::BenchmarkWhereOps::ne",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: src/integration_tests.rs
source: go-runner/src/integration_tests.rs
expression: content
---
{
Expand All @@ -14,7 +14,7 @@ expression: content
"benchmarks": [
{
"name": "BenchmarkTruncate::Plain_text",
"uri": "unknown::BenchmarkTruncate::Plain_text",
"uri": "tpl/strings/truncate_test.go::BenchmarkTruncate::Plain_text",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -25,7 +25,7 @@ expression: content
},
{
"name": "BenchmarkTruncate::With_link",
"uri": "unknown::BenchmarkTruncate::With_link",
"uri": "tpl/strings/truncate_test.go::BenchmarkTruncate::With_link",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
source: src/integration_tests.rs
source: go-runner/src/integration_tests.rs
expression: content
---
{
Expand All @@ -14,7 +14,7 @@ expression: content
"benchmarks": [
{
"name": "BenchmarkAppendBytes::EncodingFirst",
"uri": "unknown::BenchmarkAppendBytes::EncodingFirst",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::EncodingFirst",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -25,7 +25,7 @@ expression: content
},
{
"name": "BenchmarkAppendBytes::EncodingLast",
"uri": "unknown::BenchmarkAppendBytes::EncodingLast",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::EncodingLast",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -36,7 +36,7 @@ expression: content
},
{
"name": "BenchmarkAppendBytes::EncodingMiddle",
"uri": "unknown::BenchmarkAppendBytes::EncodingMiddle",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::EncodingMiddle",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -47,7 +47,7 @@ expression: content
},
{
"name": "BenchmarkAppendBytes::MultiBytesFirst",
"uri": "unknown::BenchmarkAppendBytes::MultiBytesFirst",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::MultiBytesFirst",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -58,7 +58,7 @@ expression: content
},
{
"name": "BenchmarkAppendBytes::MultiBytesLast",
"uri": "unknown::BenchmarkAppendBytes::MultiBytesLast",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::MultiBytesLast",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -69,7 +69,7 @@ expression: content
},
{
"name": "BenchmarkAppendBytes::MultiBytesMiddle",
"uri": "unknown::BenchmarkAppendBytes::MultiBytesMiddle",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::MultiBytesMiddle",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -80,7 +80,7 @@ expression: content
},
{
"name": "BenchmarkAppendBytes::NoEncoding",
"uri": "unknown::BenchmarkAppendBytes::NoEncoding",
"uri": "internal/json/bytes_test.go::BenchmarkAppendBytes::NoEncoding",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -91,7 +91,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::EncodingFirst",
"uri": "unknown::BenchmarkAppendString::EncodingFirst",
"uri": "internal/json/string_test.go::BenchmarkAppendString::EncodingFirst",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -102,7 +102,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::EncodingLast",
"uri": "unknown::BenchmarkAppendString::EncodingLast",
"uri": "internal/json/string_test.go::BenchmarkAppendString::EncodingLast",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -113,7 +113,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::EncodingMiddle",
"uri": "unknown::BenchmarkAppendString::EncodingMiddle",
"uri": "internal/json/string_test.go::BenchmarkAppendString::EncodingMiddle",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -124,7 +124,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::MultiBytesFirst",
"uri": "unknown::BenchmarkAppendString::MultiBytesFirst",
"uri": "internal/json/string_test.go::BenchmarkAppendString::MultiBytesFirst",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -135,7 +135,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::MultiBytesLast",
"uri": "unknown::BenchmarkAppendString::MultiBytesLast",
"uri": "internal/json/string_test.go::BenchmarkAppendString::MultiBytesLast",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -146,7 +146,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::MultiBytesMiddle",
"uri": "unknown::BenchmarkAppendString::MultiBytesMiddle",
"uri": "internal/json/string_test.go::BenchmarkAppendString::MultiBytesMiddle",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand All @@ -157,7 +157,7 @@ expression: content
},
{
"name": "BenchmarkAppendString::NoEncoding",
"uri": "unknown::BenchmarkAppendString::NoEncoding",
"uri": "internal/json/string_test.go::BenchmarkAppendString::NoEncoding",
"config": {
"warmup_time_ns": null,
"min_round_time_ns": null,
Expand Down
Loading
Loading