Skip to content

Commit

Permalink
fix DoQ length prefix generation and zero request ID for DoQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondřej Benkovský committed Jul 6, 2023
1 parent 14d7955 commit 63f3db8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion cmd/benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ func (b *Benchmark) Run(ctx context.Context) ([]*ResultStats, error) {

// instead of setting the question, do this manually for lower overhead and lock free access to id
question.Name = q
m.Id = uint16(rando.Uint32())
if b.useQuic {
m.Id = 0
} else {
m.Id = uint16(rando.Uint32())
}
m.Question[0] = question
if limit != nil {
limit.Take()
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/quic-go/quic-go v0.34.0
github.com/stretchr/testify v1.8.4
github.com/tantalor93/doh-go v0.1.0
github.com/tantalor93/doq-go v0.1.1
github.com/tantalor93/doq-go v0.2.0
go-hep.org/x/hep v0.33.0
go.uber.org/ratelimit v0.2.0
golang.org/x/net v0.11.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tantalor93/doh-go v0.1.0 h1:GpC7qH2ciRFPIpfiFJ0FMmp1Q4dR1zNIhV16+yByciA=
github.com/tantalor93/doh-go v0.1.0/go.mod h1:GvJN2FOEuFGO0STTCbggTgGsAYkL8b04xQY+vf72IV0=
github.com/tantalor93/doq-go v0.1.1 h1:JV6meAeCkJyg8CMWZexfhb5vp7Cj2KXdQ4qcK9P7V7k=
github.com/tantalor93/doq-go v0.1.1/go.mod h1:JG6ojlkCIYCwqiOKFsLQRVzbKKmfQBMNTVrqhQzCycg=
github.com/tantalor93/doq-go v0.2.0 h1:/wEpuGV73qwgDUb4gbPmUK0K/JFeXJjofotR489MEWg=
github.com/tantalor93/doq-go v0.2.0/go.mod h1:yv52hpC3QwFzsNXwj6O3zFb9QTNLJC+LgT02K2AqDdI=
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down

0 comments on commit 63f3db8

Please sign in to comment.