You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/lovromazgon/queue-tests

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/lovromazgon/queue-tests

v0.0.0-20220611071727-71feb4fa312a
Source
Go
Version published
Created
Source

Queue-tests Build Status

Package queue-tests tests a number of queue implementations for performance and memory consumption.

How to Use

This package is mostly useful to run its benchmark tests. Run below commands to clone and get the repo ready for running the tests locally.

git clone https://github.com/christianrpetrin/queue-tests.git
go get ./...

The benchmark tests are full lifecycle tests which includes, in each test iteration:

  • Queue initialization
  • Adding N to values the queue
  • Removing N values from the queue

The tests probe adding and removing below number of items to the queues.

  • 0
  • 1
  • 10
  • 100
  • 1000 // 1k
  • 10000 // 10k
  • 100000 // 100k

The 0 test tests initialization only.

Some tests probe the queues performance by adding 3 items and then removing 1 instead of adding all items and them removing all items. To keep the runtime short, these tests will only execute for 100 and 10.000 items.

To run the tests locally, from the repo root directory, execute below command:

go test -benchmem -bench=. -run=^$

Tests

See bench_queue.md and bench_slice_size.md for details.

Supported Go Versions

The bench tests on this package automatically compile and run for below Go versions.

  • "1.7.x"
  • "1.8.x"
  • "1.9.x"
  • "1.10.x"
  • "1.11.x"

License

MIT, see LICENSE.

"Use, abuse, have fun and contribute back!"

FAQs

Package last updated on 11 Jun 2022

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