Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/javierzunzunegui/zerrors/internal/benchmark

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/javierzunzunegui/zerrors/internal/benchmark

  • v0.0.0-20200325084838-9e16b35def3e
  • Source
  • Go
  • Socket score

Version published
Created
Source

Benchmarks

Compares the performance of the two error wrapping methods in zerrors (Wrap and SWrap) to other common error wrapping methods:

  • the standard library's errors.New.
  • the standard library's fmt.Errorf with the %w pattern.
  • github.com/pkg/errors.
  • golang.org/x/xerrors.

frameless

go test ./frameless/... -test.bench=Bench -test.benchmem | go run ./cmptool > frameless/README.md

No frame info in the error message. The error message is identical in all errors. See results.

withframe

go test ./withframe/... -test.bench=Bench -test.benchmem | go run ./cmptool > withframe/README.md

With frame info in the error message. The error message is different in the various errors. See results. Note however golang.org/x/xerrors is identically replicated in the ...LikeXerrors benchmarks and github.com/pkg/errors is partially replicated in the ...LikePkgErrors benchmarks.

FAQs

Package last updated on 25 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc