Added a test for time reporting.

svn path=/trunk/boinc/; revision=248
This commit is contained in:
Michael Gary 2002-07-24 19:49:27 +00:00
parent eb9044cbe3
commit 220acccd58
2 changed files with 17 additions and 1 deletions

View File

@ -56,7 +56,7 @@ int do_checkpoint(MFILE& mf, int nchars) {
int main() { int main() {
int c, nchars = 0, retval, n; int c, nchars = 0, retval, n;
char resolved_name[512]; char resolved_name[512];
MFILE out; MFILE out, time_file;
FILE* state, *in; FILE* state, *in;
APP_IN ai; APP_IN ai;
APP_OUT ao; APP_OUT ao;
@ -82,6 +82,7 @@ int main() {
fprintf(stderr, "APP: uc_slow output open failed %d\n", retval); fprintf(stderr, "APP: uc_slow output open failed %d\n", retval);
exit(1); exit(1);
} }
time_file.open("../../time.xml", "w");
while (1) { while (1) {
c = fgetc(in); c = fgetc(in);
if (c == EOF) break; if (c == EOF) break;
@ -112,4 +113,10 @@ int main() {
exit(1); exit(1);
} }
fprintf(stderr, "APP: uc_slow ending, wrote %d chars\n", nchars); fprintf(stderr, "APP: uc_slow ending, wrote %d chars\n", nchars);
ao.percent_done = 1;
app_completed(ao);
time_file.printf("%f\n", ao.cpu_time_at_checkpoint);
time_file.flush();
time_file.close();
return 0;
} }

View File

@ -1260,3 +1260,12 @@ Michael Gary 7/23/2002
test_sticky.php (added) test_sticky.php (added)
uc_wu_sticky (added) uc_wu_sticky (added)
uc_result_sticky (added) uc_result_sticky (added)
Michael Gary 7/24/2002
- Added a test for the time reporting system.
test/
test_time.php (added)
init.inc
apps/
uc_slow.C