1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: add extra keyword for timing control

Control logging of timer with
"## timing off"  and "## timing on"
This commit is contained in:
Zdenek Kabelac 2015-04-20 19:09:02 +02:00
parent 2b4f10ac66
commit 85e833c172

View File

@ -326,10 +326,12 @@ struct TimedBuffer {
data.push_back( incomplete );
if (incomplete.second[0] == '#') {
/* Disable timing between '## 0 STACKTRACE' & '## teardown' keywords */
if (incomplete.second.find("# 0 STACKTRACE", 1) != std::string::npos) {
if (incomplete.second.find("# 0 STACKTRACE", 1) != std::string::npos ||
incomplete.second.find("# timing off", 1) != std::string::npos) {
stamp = false;
now = 0;
} else if (incomplete.second.find("# teardown", 1) != std::string::npos) {
} else if (incomplete.second.find("# teardown", 1) != std::string::npos ||
incomplete.second.find("# timing on", 1) != std::string::npos) {
stamp = true;
now = time( 0 );
}