From e9285d0cdea756a2830f0ace378e4197b36869aa Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Fri, 12 Jun 2020 01:44:56 +0000 Subject: Add initial instrumentation to and fix warnings in DIS stressmarks Changes: - Backpoint fix to randInt range - Instrument benchmarks with time tracking - assert inputs are correct length to fix compiler warnings Problems: - Timing on a per-loop basis is non representative of real-world workloads, as we clear the cache after every loop. These all need to be re-instrumented to record times for the whole benchmark, rather than per-loop. --- dis/original/Neighborhood/neighborhood.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dis/original/Neighborhood') diff --git a/dis/original/Neighborhood/neighborhood.c b/dis/original/Neighborhood/neighborhood.c index 2d50336..1736d38 100644 --- a/dis/original/Neighborhood/neighborhood.c +++ b/dis/original/Neighborhood/neighborhood.c @@ -42,10 +42,10 @@ int main(int argc, char** argv) time_t endTime; SET_UP - fscanf(stdin, "%ld %d %d %d %d %d %d %d", + assert(fscanf(stdin, "%ld %d %d %d %d %d %d %d", &seed, &bitDepth, &dimension, &numberLines, &minThickness, &maxThickness, - &distanceShort, &distanceLong); + &distanceShort, &distanceLong) == 8); assert((seed >= MIN_SEED) && (seed <= MAX_SEED)); assert((dimension > 0) && (dimension <= MAX_DIMENSION)); @@ -70,7 +70,7 @@ int main(int argc, char** argv) endTime = time(NULL); WRITE_TO_FILE - printf(" end time is %d\n", endTime); +// printf(" end time is %d\n", endTime); fprintf(stdout, "%9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e %9.4e", values.distShort.deg0.entropy, -- cgit v1.2.2