projects
/
check_postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d21a5a1
)
Use the entire sub call for the "totaltime" counter for same_schema.
author
Greg Sabino Mullane
<
[email protected]
>
Tue, 12 Jul 2011 11:45:26 +0000
(07:45 -0400)
committer
Greg Sabino Mullane
<
[email protected]
>
Tue, 12 Jul 2011 11:45:26 +0000
(07:45 -0400)
check_postgres.pl
patch
|
blob
|
blame
|
history
diff --git
a/check_postgres.pl
b/check_postgres.pl
index 074761c1bcf37f1309532831dbc43eddc52d2d63..592b7e3c70f1b0dd7af775e2afd5c75123d55e63 100755
(executable)
--- a/
check_postgres.pl
+++ b/
check_postgres.pl
@@
-5963,6
+5963,9
@@
sub check_same_schema {
## Warning and critical are not used
## The filter argument is supported
+ ## We override the usual $db->{totaltime} with our own counter
+ my $start = [gettimeofday()];
+
## Check for filtering rules, then store inside opt{filtered}
my %filter;
if (exists $opt{filter}) {
@@
-6179,6
+6182,9
@@
sub check_same_schema {
}
}
+ ## Set the total time
+ $db->{totaltime} = sprintf '%.2f', tv_interval($start);
+
## Comparison is done, let's report the results
if (! $opt{failcount}) {
add_ok msg('ss-matched');