Skip to content

Commit d671d25

Browse files
committed
testshade -runstats: be more careful about timing
Make sure the main timer doesn't count writing output files to disk.
1 parent 8e2caa5 commit d671d25

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/testshade/testshade.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,7 @@ test_shade (int argc, const char *argv[])
11531153
}
11541154
}
11551155
}
1156+
double runtime = timer.lap();
11561157

11571158
if (outputfiles.size() == 0)
11581159
std::cout << "\n";
@@ -1187,10 +1188,11 @@ test_shade (int argc, const char *argv[])
11871188

11881189
// Print some debugging info
11891190
if (debug || runstats || profile) {
1190-
double runtime = timer.lap();
1191+
double writetime = timer.lap();
11911192
std::cout << "\n";
11921193
std::cout << "Setup: " << OIIO::Strutil::timeintervalformat (setuptime,2) << "\n";
11931194
std::cout << "Run : " << OIIO::Strutil::timeintervalformat (runtime,2) << "\n";
1195+
std::cout << "Write: " << OIIO::Strutil::timeintervalformat (writetime,2) << "\n";
11941196
std::cout << "\n";
11951197
std::cout << shadingsys->getstats (5) << "\n";
11961198
OIIO::TextureSystem *texturesys = shadingsys->texturesys();

0 commit comments

Comments
 (0)