Skip to content

A stress-testing util to test optimized solutions against brute solutions.

License

Notifications You must be signed in to change notification settings

dv-rastogi/Stress-Test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STRESS TEST

A stress testing script made by me (finally! 😖), in order to test your solutions against brute solutions.

What is stress testing?

I shall speak here in reference with Competitve Programming 🙇.

For optimization problems sometimes your optimized code tends to fail on corner cases which are rather hard to figure out leading to a series of WA/TLE verdicts.

To overcome such annoying issues of brainstorming the aforementioned corner cases yourself, the naive idea of stress testing comes into play.

For the very same problem, you quickly code out a brute solution and hopefully with the help of my script 🙆‍♂️ and a random case generator (User parameter), you compare your output against the brute output (User parameter) and hope for a fail verdict and voilà, you get the test case your code was failing on!

Please refer user.py for modelling required user parameters!

Preview

OK verdicts

Fail verdicts

How to use

  • Set your configuration in user.py.
    • This includes configuration parameters such as logs, number of test cases, etc.
    • Create your gen_case function.
    • Create your checker function.
  • Code an optimized solution for the problem. Code it in sols/main.cpp.
  • Code a brute solution for the problem. Code it in sols/brute.cpp.
  • Run make stress & wait to hopefully retrieve a corner case, lol.
Currently supported on Linux/Mac

All contributions are welcomed! ✋

About

A stress-testing util to test optimized solutions against brute solutions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published