QCFractal icon indicating copy to clipboard operation
QCFractal copied to clipboard

Report number of completed results

Open mattwelborn opened this issue 5 years ago • 2 comments

Is your feature request related to a problem? Please describe. The server logs information about total results, which can be many more than the number of completed, usable results.

Describe the solution you'd like The server should log the number of completed results in addition to the total number of results. This information should be made available at the /information endpoint.

Describe alternatives you've considered Not worrying about it because the total number of results is a reasonable proxy for the number of completed results.

Additional context There is some commented code to do this already, with the note that it's too slow. However, it should be fast to do by counting the number of results that are not complete:

SELECT COUNT(*) FROM public.base_result - 584 ms SELECT COUNT(*) FROM public.base_result WHERE status = 'complete' - 4184 ms SELECT COUNT(*) FROM public.base_result WHERE status != 'complete' - 957 ms

mattwelborn avatar Dec 17 '19 13:12 mattwelborn

I wanted to limit the number of full table scans. How important do you gauge this information to be?

dgasmith avatar Dec 17 '19 22:12 dgasmith

Right now, it's low importance since the current count is 95% correct. However, it could become a problem if one were to say... schedule 2 million computations to run over the break.

mattwelborn avatar Dec 18 '19 15:12 mattwelborn