draft:

Yet another aproach on stress testing

Revision ru1, by waipoli, 2025-03-23 10:14:44

Servus Codeforces,

I think many of you have already heard about stress testing, and many of you have your own scripts, etc., which may not always be convenient.
That’s why I present to you OHP, a convenient way to do stress testing.


Installation

wget https://github.com/waipoli/ohp/blob/master/ohp

However, I also recommend adding an alias to your bash/zsh/...rc afterwards.


Usage

To start, run ohp init in your working directory.

A folder will appear:

Put the correct solution in correct.cpp and the one you're testing in sol.cpp.

Write a generator using testlib in the gen.cpp file.

For the checker, you need to use three inputs/outputs like this:

#include "checker_utils.h"

using namespace std;

/*
int a, b, c;
input >> a;
output_correct >> b;
output_sol >> c;

return AC;
return WA;
*/
int main() {
    return 0;
}

If the checker finds the answer correct, return AC; otherwise, return WA.


Then run ohp compile and ohp run -t={number_of_tests}.

If it finds an incorrect test, it will display it to you, and you can find the test in the pipe folder.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English waipoli 2025-03-23 10:22:49 0 Tiny change: 'older.\n\n### Th' -> 'older.\n\n\n### Th' (published)
en1 English waipoli 2025-03-23 10:21:03 1465 Initial revision for English translation (saved to drafts)
ru1 Russian waipoli 2025-03-23 10:14:44 1330 Первая редакция (сохранено в черновиках)