Skip to content

perf: add initial benchmark#13

Merged
mccutchen merged 2 commits intomainfrom
benchmarks
Dec 29, 2024
Merged

perf: add initial benchmark#13
mccutchen merged 2 commits intomainfrom
benchmarks

Conversation

@mccutchen
Copy link
Owner

Results from my laptop:

$ make bench
go test -bench=. -benchmem
goos: darwin
goarch: arm64
pkg: github.com/mccutchen/websocket
cpu: Apple M2
BenchmarkReadFrame/64b-8                11431972               101.1 ns/op           120 B/op          4 allocs/op
BenchmarkReadFrame/256b-8                5405172               222.2 ns/op           312 B/op          5 allocs/op
BenchmarkReadFrame/1024b-8               1801424               667.1 ns/op          1080 B/op          5 allocs/op
BenchmarkReadFrame/65536b-8                29114             41176 ns/op           65601 B/op          5 allocs/op
BenchmarkReadFrame/1048576b-8               1804            664341 ns/op         1048655 B/op          5 allocs/op
PASS
ok      github.com/mccutchen/websocket  7.914s

More thorough benchmarks will likely require additional refactoring.

More thorough benchmarks will likely require additional refactoring.
@mccutchen mccutchen enabled auto-merge (squash) December 29, 2024 06:53
@codecov
Copy link

codecov bot commented Dec 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.48%. Comparing base (c335860) to head (45f9e80).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #13   +/-   ##
=======================================
  Coverage   79.48%   79.48%           
=======================================
  Files           2        2           
  Lines         424      424           
=======================================
  Hits          337      337           
  Misses         63       63           
  Partials       24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mccutchen mccutchen merged commit 19403c6 into main Dec 29, 2024
5 checks passed
@mccutchen mccutchen deleted the benchmarks branch December 29, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant