Coder Social home page Coder Social logo

Performance Tests about idgen HOT 1 CLOSED

robthree avatar robthree commented on August 18, 2024
Performance Tests

from idgen.

Comments (1)

RobThree avatar RobThree commented on August 18, 2024

CreateId_Throws_OnSequenceOverflow tests specifically for overflow within the mask resolution within a single time interval.

You could test for other masks but that doesn't make much sense; you can't test every possible combination (within reason, and expecting the tests to run quickly); just as you also don't test the + operator for all combinations of operands. You test at the edge(s) of the limits (n-1, n, n+1) and that is what that test does. It generates a few ID's expecting no problems and then expects an overflow for the next ID generated.

What you may be looking over or missing is that we're using a MockTimeSource so we can advance (or revert) time as we wish. So there's no need to create a bunch of ID's hoping the time will elapse some specific interval. It makes testing (especially 'performance testing') much easier and reliable.

Suggestions for specific tests are welcome though.

from idgen.

Related Issues (20)

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.