Skip to content

Commit

Permalink
update _benchmarks modules
Browse files Browse the repository at this point in the history
  • Loading branch information
kataras committed Nov 9, 2023
1 parent d3815dc commit b324770
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion _benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ go test -bench=.

## Results

Comparison between: [kataras/jwt](https://github.com/kataras/jwt), [dgrijalva/jwt-go](github.com/dgrijalva/jwt-go) and [go-jose/go-jose](https://github.com/go-jose/go-jose). Higher is better.
Comparison between: [kataras/jwt](https://github.com/kataras/jwt), [golang-jwt/jwt](github.com/golang-jwt/jwt) and [go-jose/go-jose](https://github.com/go-jose/go-jose). Higher is better.

![Benchmarks Total Repetitions - higher is better](http://iris-go.com/images/jwt/benchmarks.png)

Expand Down
8 changes: 4 additions & 4 deletions _benchmarks/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module benchmarks

go 1.19
go 1.20

replace github.com/kataras/jwt => ../

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/go-jose/go-jose/v3 v3.0.0
github.com/go-jose/go-jose/v3 v3.0.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/kataras/jwt v0.0.0-00010101000000-000000000000
)

require golang.org/x/crypto v0.6.0 // indirect
require golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 // indirect
10 changes: 4 additions & 6 deletions _benchmarks/go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo=
github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA=
github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -14,8 +14,6 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7 h1:0hQKqeLdqlt5iIwVOBErRisrHJAN57yOiPRQItI20fU=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
2 changes: 1 addition & 1 deletion _benchmarks/sign_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"testing"
"time"

jwtgo "github.com/dgrijalva/jwt-go"
jose "github.com/go-jose/go-jose/v3"
josejwt "github.com/go-jose/go-jose/v3/jwt"
jwtgo "github.com/golang-jwt/jwt"
jwt "github.com/kataras/jwt"
)

Expand Down
4 changes: 2 additions & 2 deletions _benchmarks/verify_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"time"

jwtgo "github.com/dgrijalva/jwt-go"
josejwt "github.com/go-jose/go-jose/v3/jwt"
jwtgo "github.com/golang-jwt/jwt"
jwt "github.com/kataras/jwt"
)

Expand Down Expand Up @@ -69,7 +69,7 @@ func BenchmarkVerify_go_jose(b *testing.B) {
// Note: the go-jose package's `ParseSigned` does not actually verify the token,
// it just decodes it, we have to call its `Claims` method without a destination (2nd arg)
// to make it to verify the signature (the fastest way to do it on that package)
// unlike the rest (kataras/jwt and dgrijalva/jwt-go).
// unlike the rest (kataras/jwt and golang-jwt/jwt).
parsedToken, err := josejwt.ParseSigned(tokenString)
if err != nil {
b.Fatal(err)
Expand Down

0 comments on commit b324770

Please sign in to comment.