From 1a6119e929020da15c9f57eefddb41c33ece9848 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 10 Nov 2009 23:39:51 +0000 Subject: [PATCH] svn path=/trunk/boinc/; revision=19534 --- sched/credit_test.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sched/credit_test.cpp b/sched/credit_test.cpp index 69bfde36db..0bf833ad7a 100644 --- a/sched/credit_test.cpp +++ b/sched/credit_test.cpp @@ -271,6 +271,7 @@ int main(int argc, char** argv) { int n=0, nstats=0, rsc_type; double total_old_credit = 0; double total_new_credit = 0; + printf("DB query: select * from result %s\n", clause); while (!r.enumerate(clause)) { printf("%d) result %d host %d\n", n, r.id, r.hostid); @@ -395,6 +396,11 @@ int main(int argc, char** argv) { print_avs(); } } + if (nstats == 0) { + printf("Insufficient jobs were read from DB\n"); + exit(0); + } + print_avs(); printf("Average old credit: %f\n", total_old_credit/nstats);