GithubHelp home page GithubHelp logo

xuejiaozhang / queue-tests Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christianrpetrin/queue-tests

0.0 2.0 0.0 1.07 MB

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

License: MIT License

Go 100.00%

queue-tests's Introduction

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!"

queue-tests's People

Contributors

christianrpetrin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.