Skip to content

Commit

Permalink
Add jwt benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Apr 18, 2022
1 parent 63c1fd5 commit 2270786
Show file tree
Hide file tree
Showing 8 changed files with 1,072 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*bench.exec
3 changes: 3 additions & 0 deletions jwt/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
run:
go test -c -o jwt-bench.exec
time ./jwt-bench.exec -test.v -test.benchmem -test.bench ^Benchmark -test.count 5 -test.run ^$ > bench.txt
37 changes: 37 additions & 0 deletions jwt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# jwt

## Who

```
github.com/cristalhq/jwt/v4 v4.0.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/lestrrat-go/jwx v1.2.23
github.com/pascaldekloe/jwt v1.10.0
```

## Where

```
MacBook Pro (15-inch, 2017)
2,8 GHz Quad-Core Intel Core i7
16 GB 2133 MHz LPDDR3
```

## How

```shell script
# build & run benchmark
$ make run

# or in steps

# build test executable
$ go test -c -o jwt-bench.exec

# run executable
$ time ./jwt-bench.exec -v -benchmem -bench ^Benchmark -count 5 -run ^$ > bench.txt
```

## Well

See [bench.txt](https://github.com/cristalhq/benchmarks/blob/main/jwt/bench.txt)
369 changes: 369 additions & 0 deletions jwt/bench.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 2270786

Please sign in to comment.