go-macaroon / macaroon

A native Go implementation of macaroons
BSD 3-Clause "New" or "Revised" License
182 stars 24 forks source link

add tracing functionality #23

Closed rogpeppe closed 7 years ago

rogpeppe commented 7 years ago

This feature, mainly for debugging, allows a caller to find out details of the macaroon verification. It This is intended particularly for debugging divergent macaroon implementations, but could also be useful for other uncommon macaroon operations, such as removing caveats given knowledge of a root key.

benchmark                    old ns/op     new ns/op     delta
BenchmarkNew-4               3125          3133          +0.26%
BenchmarkAddCaveat-4         2831          2804          -0.95%
BenchmarkVerifyLarge-4       60399         59982         -0.69%
BenchmarkVerifySmall-4       3925          3914          -0.28%
BenchmarkMarshalJSON-4       2039          2017          -1.08%
BenchmarkUnmarshalJSON-4     3863          3843          -0.52%