Thank you!

On Wednesday 7 August 2024 at 07:10:55 UTC+1 wagner riffel wrote:

> Jochen Voss <joche...@gmail.com> wrote:
> > Now I just want to run one of these sub-benchmarks. I tried -bench
> > '^BenchmarkTextLayout/CFFSimple1$' but this runs two of the benchmarks:
> > 
> > > go test -run=^$ -bench '^BenchmarkTextLayout/CFFSimple1$'
> > goos: darwin
> > goarch: arm64
> > pkg: seehuhn.de/go/pdf/graphics
> > BenchmarkTextLayout/CFFSimple1-8 49 24198452 ns/op
> > BenchmarkTextLayout/OpenTypeCFFSimple1-8 48 24209569 ns/op
> > PASS
> > ok seehuhn.de/go/pdf/graphics 3.804s
> > 
> > How do I just run "BenchmarkTextLayout/CFFSimple1"?
> > 
>
> The regexp matches against the benchmark name, not the "full name". 
> Slashes are
> interpreted as a separator for names to be matched against, thus your 
> regexp
> first matches "^BenchmarkTextLayout" against all top-level benchmarks, then
> matches "CFFSimple1$" against all sub-benchmarks names found in
> "BenchmarkTextLayout" which indeed "CFFSimple1" and "OpenTypeCFFSimple1" 
> are
> matches of.
>
> So the following regexp should only match "BenchmarkTextLayout/CFFSimple1".
>
> $ go test -bench='^BenchmarkTextLayout/^CFFSimple1$'
>
> Note the '^' before CFF.
>
> BR.
>
> -w
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/d8b77384-4da1-480d-8bd1-dad0d6f1d0b5n%40googlegroups.com.

Reply via email to