cats-main
cats-main copied to clipboard
Visualize spent resources in request details
The goal is to display graphs of memory/time depending on input size. Since problem packages do not currently contain explicit input size data, the method used should work even in the absence of such data.
"Resources" in question are user time, wallclock time, peak memory, written bytes and anything else measured by Spawner.
- Calculate standard solution resources for every test -- can be currently done by selecting last standard solution request, will also be useful for relative time limits.
- Optionally, cache standard solution resources in
tests. - (?) Add
input_sizefield totests, containing an arbitrary string - (?) Add more detailed keywords in
onamespace, e.g.o.poly.n2, 'o.nlogn` etc. - (?) Add
algorithmic_complexityfield toproblem_sources, assign it based on keywords and/or attributes in problem package. - Import some JS graphing library (also use it for console graphs)
- On
req_detailspage, add graph of resource/input_size - Add 'Resource' selector
- Add 'input size source' selector of: explicit, checker comment, generator param + input file, guess by standard solution time
- For the first three sources add sub-selector for integer value P. For each test, select P-th integer parsed from string -- so multi-parametric problems and imported problems with verbose checkers are automatically supported.
- For "guess by standard time" add sub-selector or "algorithmic complexity", fill it with explicit data if available. Then, calculate approximate input size by fitting the complexity function to actual times.
- Display calculated data on graph, with various visual controls, in particular linear/logarithmic axes, usage of test number instead of size, displaying several graphs at once.