Skip to content

Commit

Permalink
Remove ":" from testdata (#3210)
Browse files Browse the repository at this point in the history
* Remove ":" from testdata

When importing pyroscope as go module I get those errors (on darwin)

```
x-dev-01__kafka-0__cpu__0.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu__1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu__1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu__2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu__2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu__3.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu__3.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.block:contentions:count:block:count.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.block:contentions:count:block:count.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.block:delay:nanoseconds:block:count.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.block:delay:nanoseconds:block:count.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_outside_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_outside_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_outside_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.memory:alloc_outside_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.mutex:contentions:count:mutex:count.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.mutex:contentions:count:mutex:count.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.mutex:delay:nanoseconds:mutex:count.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.mutex:delay:nanoseconds:mutex:count.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock0_alloc0__0.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__0.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__0.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__0.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__0.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__0.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__0.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__1.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__1.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__1.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__1.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__2.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__2.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__2.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__2.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__3.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__3.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__3.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__3.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__3.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/cortex-dev-01__kafka-0__cpu_lock_alloc__3.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.15666661103234080825.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.15666661103234080825.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.16370823494798218517.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.16370823494798218517.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.2539015855607244867.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.2539015855607244867.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.5571933481434853072.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump1.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.5571933481434853072.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.memory:alloc_in_new_tlab_bytes:bytes:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.memory:alloc_in_new_tlab_objects:count:space:bytes.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.memory:live:count:objects:count.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.memory:live:count:objects:count.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.10784330302778997279.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.10784330302778997279.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.14685508092873724845.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.14685508092873724845.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.15666661103234080825.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.15666661103234080825.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.16370823494798218517.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.16370823494798218517.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.2539015855607244867.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.2539015855607244867.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.302387572117411911.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.302387572117411911.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.5571933481434853072.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.5571933481434853072.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.6511396920643364271.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.process_cpu:cpu:nanoseconds:cpu:nanoseconds.6511396920643364271.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.10784330302778997279.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.10784330302778997279.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.14685508092873724845.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.14685508092873724845.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.15666661103234080825.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.15666661103234080825.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.16370823494798218517.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.16370823494798218517.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.17241709254077376921.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.17241709254077376921.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.2539015855607244867.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.2539015855607244867.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.302387572117411911.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.302387572117411911.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.5571933481434853072.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.5571933481434853072.pb.gz": invalid char ':'
pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.6511396920643364271.pb.gz: malformed file path "pkg/og/convert/jfr/testdata/dump2.jfr.gz.wall:wall:nanoseconds:wall:nanoseconds.6511396920643364271.pb.gz": invalid char '

```

* Replace `:` in tests
  • Loading branch information
simonswine authored Apr 15, 2024
1 parent 77f3e43 commit e845a6b
Show file tree
Hide file tree
Showing 52 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/test/integration/ingest_jfr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package integration
import (
"fmt"
"os"
"strings"
"testing"

"connectrpc.com/connect"
Expand Down Expand Up @@ -180,7 +181,7 @@ func expectedPPROFFile(testdatum jfrTestData, metric expectedMetric) string {
ls := lbls.Labels()
h := ls.Hash()

return fmt.Sprintf("%s.%s.%d.pb.gz", testdatum.jfr, metric.name, h)
return fmt.Sprintf("%s.%s.%d.pb.gz", testdatum.jfr, strings.ReplaceAll(metric.name, ":", "_"), h)
}

func TestCorruptedJFR422(t *testing.T) {
Expand Down

0 comments on commit e845a6b

Please sign in to comment.