From 998d3558aafef97eef62c97ee30324cbbded9d21 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Tue, 4 Nov 2003 19:53:32 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=2627 --- checkin_notes | 7 +++++++ sched/validate_trivial.C | 14 +++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index ed0a0da581..db493ad452 100755 --- a/checkin_notes +++ b/checkin_notes @@ -7415,3 +7415,10 @@ Karl 2003-11-03 win_build/installer/* added (115 files) + +Karl 2003-11-04 + - trivial validator: check for a minimum CPU time + + sched/ + validate_trivial.C + diff --git a/sched/validate_trivial.C b/sched/validate_trivial.C index b8903dc245..6c55e8bc14 100644 --- a/sched/validate_trivial.C +++ b/sched/validate_trivial.C @@ -19,6 +19,8 @@ #include "validate_util.h" +static const double MIN_CPU_TIME = 10000; + // TODO: use md5 hash // read file into memory @@ -27,11 +29,11 @@ int init_result_trivial(RESULT const& result, void*& data) { } int check_pair_initialized_trivial( - RESULT const& /*r1*/, void* /*data1*/, - RESULT const& /*r2*/, void* /*data2*/, + RESULT const& r1, void* /*data1*/, + RESULT const& r2, void* /*data2*/, bool& match -) { - match = true; + ) { + match = (r1.cpu_time >= MIN_CPU_TIME && r2.cpu_time >= MIN_CPU_TIME); return 0; } @@ -55,7 +57,9 @@ int check_pair(RESULT const& r1, RESULT const& r2, bool& match) { // init_result_trivial, // check_pair_initialized_trivial, // cleanup_result_trivial); - match = true; + return check_pair_initialized_trivial(r1, NULL, + r2, NULL, + match); return 0; }