| 1 | package irelatescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/ |
| 2 | |
| 3 | import ( |
| 4 | "testingscip-go gomod github.com/golang/go/src go1.23.0 testing/" |
| 5 | |
| 6 | "github.com/brentp/bixscip-go gomod github.com/brentp/bix 000f089eabc0 `github.com/brentp/bix`/" |
| 7 | "github.com/brentp/irelate/interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/" |
| 8 | ) |
| 9 | |
| 10 | func benchmarkStreamsscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/benchmarkStreams().(nStreams int, b *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Bscip-go gomod github.com/golang/go/src go1.23.0 testing/B#) { |
| 11 | |
| 12 | for n := 0; n < b.Nscip-go gomod github.com/golang/go/src go1.23.0 testing/B#N.; n++ { |
| 13 | streams := make([]interfacesscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/.RelatableIteratorscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableIterator#, 0) |
| 14 | f := "data/test.bed.gz" |
| 15 | |
| 16 | for i := 0; i < nStreams; i++ { |
| 17 | s, e := bixscip-go gomod github.com/brentp/bix 000f089eabc0 `github.com/brentp/bix`/.Newscip-go gomod github.com/brentp/bix 000f089eabc0 `github.com/brentp/bix`/New().(f) |
| 18 | if e != nil { |
| 19 | panic(e) |
| 20 | } |
| 21 | q, e := s.Queryscip-go gomod github.com/brentp/bix 000f089eabc0 `github.com/brentp/bix`/Bix#Query().(nil) |
| 22 | streams = append(streams, q) |
| 23 | } |
| 24 | |
| 25 | //for a := range IRelate(CheckRelatedByOverlap, 0, Less, streams...) { |
| 26 | iter := IRelatescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/IRelate().(CheckOverlapPrefixscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/CheckOverlapPrefix()., 0, LessPrefixscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/LessPrefix()., streams...) |
| 27 | for { |
| 28 | a, err := iter.Nextscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableIterator#Next.() |
| 29 | if err != nil { |
| 30 | break |
| 31 | } |
| 32 | a.Startscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/IPosition#Start.() |
| 33 | } |
| 34 | for _, s := range streams { |
| 35 | s.Closescip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate/interfaces`/RelatableIterator#Close.() |
| 36 | } |
| 37 | |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | func Benchmark2Streamsscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/Benchmark2Streams().(b *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Bscip-go gomod github.com/golang/go/src go1.23.0 testing/B#) { benchmarkStreamsscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/benchmarkStreams().(2, b) } |
| 42 | func Benchmark3Streamsscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/Benchmark3Streams().(b *testingscip-go gomod github.com/golang/go/src go1.23.0 testing/.Bscip-go gomod github.com/golang/go/src go1.23.0 testing/B#) { benchmarkStreamsscip-go gomod github.com/brentp/irelate . `github.com/brentp/irelate`/benchmarkStreams().(3, b) } |