usaco-guide icon indicating copy to clipboard operation
usaco-guide copied to clipboard

stress testing cmd app

Open SansPapyrus683 opened this issue 3 years ago • 10 comments

ok so i was looking @ the debugging module and most of it works only in bash, and python isn't supported it all so i was thinking what if we made an entire encapsulated cmd app that just took the program along with the input + output files, and outputted all the results and then put it on github?

SansPapyrus683 avatar Dec 12 '21 01:12 SansPapyrus683

yeah cool, i could help with it, probably sometime in the next two weeks though

ryanchou-dev avatar Dec 12 '21 01:12 ryanchou-dev

python isn't supported it all

Isn't it easy enough to modify the script to support Python (or Java)?

# Usage: 'sh stress.sh'
gen="./gen"
prog1="python3 py_sol.py" # or java java_sol, etc
prog2="./cpp_sol"

for((i = 1; ; ++i)); do
    echo $i
    $gen $i > int # gen takes in tc as a command line argument
    $prog1 < int > out1
    $prog2 < int > out2
    diff -b out1 out2 || break
done

bqi343 avatar Dec 19 '21 02:12 bqi343

i mean i feel like it'd still be nice to have one command to rule them all, yknow?

SansPapyrus683 avatar Dec 19 '21 02:12 SansPapyrus683

what do you mean by that? it should be simple enough that you could type it up in a contest

bqi343 avatar Dec 19 '21 02:12 bqi343

no? not really?

SansPapyrus683 avatar Dec 19 '21 02:12 SansPapyrus683

so what's this for, if it's not for debugging in a USACO contest?

bqi343 avatar Dec 19 '21 03:12 bqi343

just stress testing in general?

SansPapyrus683 avatar Dec 19 '21 04:12 SansPapyrus683

something like this but in the cmd

SansPapyrus683 avatar Apr 13 '22 04:04 SansPapyrus683

something like this but in the cmd

it looks like the creator has to manually add the problems (probably get data & stuff from the problem?)

ryanchou-dev avatar Apr 13 '22 04:04 ryanchou-dev

unless you want something like you give the problem's format for input and it just brute forces like a lot of them?

ryanchou-dev avatar Apr 13 '22 04:04 ryanchou-dev

https://github.com/SansPapyrus683/AAARGH

SansPapyrus683 avatar Sep 12 '22 16:09 SansPapyrus683