mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
tests: add extra keyword for timing control
Control logging of timer with "## timing off" and "## timing on"
This commit is contained in:
parent
2b4f10ac66
commit
85e833c172
@ -326,10 +326,12 @@ struct TimedBuffer {
|
|||||||
data.push_back( incomplete );
|
data.push_back( incomplete );
|
||||||
if (incomplete.second[0] == '#') {
|
if (incomplete.second[0] == '#') {
|
||||||
/* Disable timing between '## 0 STACKTRACE' & '## teardown' keywords */
|
/* 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;
|
stamp = false;
|
||||||
now = 0;
|
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;
|
stamp = true;
|
||||||
now = time( 0 );
|
now = time( 0 );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user