|
63 | 63 | PGSM::append_to_file($stdout); |
64 | 64 |
|
65 | 65 | # Test: total_plan_time is not 0 |
66 | | -($cmdret, $stdout, $stderr) = $node->psql( |
67 | | - 'postgres', |
68 | | - 'SELECT total_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
69 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 66 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 67 | + 'SELECT total_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
70 | 68 | trim($stdout); |
71 | 69 | isnt($stdout, '0', "Compare: total_plan_time is not 0)."); |
72 | 70 |
|
73 | 71 | # Test: min_plan_time is not 0 |
74 | | -($cmdret, $stdout, $stderr) = $node->psql( |
75 | | - 'postgres', |
76 | | - 'SELECT min_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
77 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 72 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 73 | + 'SELECT min_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
78 | 74 | trim($stdout); |
79 | 75 | isnt($stdout, '0', "Compare: min_plan_time is not 0)."); |
80 | 76 |
|
81 | 77 | # Test: max_plan_time is not 0 |
82 | | -($cmdret, $stdout, $stderr) = $node->psql( |
83 | | - 'postgres', |
84 | | - 'SELECT max_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
85 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 78 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 79 | + 'SELECT max_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
86 | 80 | trim($stdout); |
87 | 81 | isnt($stdout, '0', "Compare: max_plan_time is not 0)."); |
88 | 82 |
|
89 | 83 | # Test: mean_plan_time is not 0 |
90 | | -($cmdret, $stdout, $stderr) = $node->psql( |
91 | | - 'postgres', |
92 | | - 'SELECT mean_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
93 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 84 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 85 | + 'SELECT mean_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
94 | 86 | trim($stdout); |
95 | 87 | isnt($stdout, '0', "Compare: mean_plan_time is not 0)."); |
96 | 88 |
|
97 | 89 | # Test: stddev_plan_time is not 0 |
98 | | -#($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT stddev_plan_time FROM pg_stat_monitor WHERE calls = 2;', extra_params => ['-Pformat=unaligned','-Ptuples_only=on']); |
| 90 | +#($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT stddev_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
99 | 91 | #trim($stdout); |
100 | 92 | #isnt($stdout, '0', "Compare: stddev_plan_time is not 0)."); |
101 | 93 |
|
102 | 94 | # Test: total_plan_time = min_plan_time + max_plan_time |
103 | | -($cmdret, $stdout, $stderr) = $node->psql( |
104 | | - 'postgres', |
105 | | - 'SELECT round(total_plan_time::numeric, 3) = round(min_plan_time::numeric + max_plan_time::numeric, 3) FROM pg_stat_monitor WHERE calls = 2;', |
106 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 95 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 96 | + 'SELECT round(total_plan_time::numeric, 3) = round(min_plan_time::numeric + max_plan_time::numeric, 3) FROM pg_stat_monitor WHERE calls = 2;' |
| 97 | +); |
107 | 98 | trim($stdout); |
108 | 99 | is($stdout, 't', |
109 | 100 | "Compare: round(total_plan_time::numeric, 3) = round(min_plan_time::numeric + max_plan_time::numeric, 3)." |
110 | 101 | ); |
111 | 102 |
|
112 | 103 | # Test: mean_plan_time = total_plan_time/2 |
113 | | -#($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT round(mean_plan_time::numeric, 3) = round((total_plan_time / 2)::numeric, 3) FROM pg_stat_monitor WHERE calls = 2;', extra_params => ['-Pformat=unaligned','-Ptuples_only=on']); |
| 104 | +#($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT round(mean_plan_time::numeric, 3) = round((total_plan_time / 2)::numeric, 3) FROM pg_stat_monitor WHERE calls = 2;'); |
114 | 105 | #trim($stdout); |
115 | 106 | #is($stdout,'t',"Test mean_plan_time: round(mean_plan_time::numeric, 3) = round((total_plan_time / 2)::numeric, 3)."); |
116 | 107 |
|
117 | 108 | # Test: stddev_plan_time = mean_plan_time - min_plan_time |
118 | | -#($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT round(stddev_plan_time::numeric, 3) = round(mean_plan_time::numeric - min_plan_time::numeric, 3) FROM pg_stat_monitor WHERE calls = 2;', extra_params => ['-Pformat=unaligned','-Ptuples_only=on']); |
| 109 | +#($cmdret, $stdout, $stderr) = $node->psql('postgres', 'SELECT round(stddev_plan_time::numeric, 3) = round(mean_plan_time::numeric - min_plan_time::numeric, 3) FROM pg_stat_monitor WHERE calls = 2;'); |
119 | 110 | #trim($stdout); |
120 | 111 | #is($stdout,'t',"Compare mean_plan_time: round(stddev_plan_time::numeric, 3) = round(mean_plan_time::numeric - min_plan_time::numeric, 3)."); |
121 | 112 |
|
|
162 | 153 | PGSM::append_to_file($stdout); |
163 | 154 |
|
164 | 155 | # Test: total_plan_time is 0 |
165 | | -($cmdret, $stdout, $stderr) = $node->psql( |
166 | | - 'postgres', |
167 | | - 'SELECT total_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
168 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 156 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 157 | + 'SELECT total_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
169 | 158 | trim($stdout); |
170 | 159 | is($stdout, '0', "Compare: total_plan_time is 0)."); |
171 | 160 |
|
172 | 161 | # Test: min_plan_time is 0 |
173 | | -($cmdret, $stdout, $stderr) = $node->psql( |
174 | | - 'postgres', |
175 | | - 'SELECT min_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
176 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 162 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 163 | + 'SELECT min_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
177 | 164 | trim($stdout); |
178 | 165 | is($stdout, '0', "Compare: min_plan_time is 0)."); |
179 | 166 |
|
180 | 167 | # Test: max_plan_time is 0 |
181 | | -($cmdret, $stdout, $stderr) = $node->psql( |
182 | | - 'postgres', |
183 | | - 'SELECT max_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
184 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 168 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 169 | + 'SELECT max_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
185 | 170 | trim($stdout); |
186 | 171 | is($stdout, '0', "Compare: max_plan_time is 0)."); |
187 | 172 |
|
188 | 173 | # Test: mean_plan_time is 0 |
189 | | -($cmdret, $stdout, $stderr) = $node->psql( |
190 | | - 'postgres', |
191 | | - 'SELECT mean_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
192 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 174 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 175 | + 'SELECT mean_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
193 | 176 | trim($stdout); |
194 | 177 | is($stdout, '0', "Compare: mean_plan_time is 0)."); |
195 | 178 |
|
196 | 179 | # Test: stddev_plan_time is 0 |
197 | | -($cmdret, $stdout, $stderr) = $node->psql( |
198 | | - 'postgres', |
199 | | - 'SELECT stddev_plan_time FROM pg_stat_monitor WHERE calls = 2;', |
200 | | - extra_params => [ '-Pformat=unaligned', '-Ptuples_only=on' ]); |
| 180 | +($cmdret, $stdout, $stderr) = $node->psql('postgres', |
| 181 | + 'SELECT stddev_plan_time FROM pg_stat_monitor WHERE calls = 2;'); |
201 | 182 | trim($stdout); |
202 | 183 | is($stdout, '0', "Compare: stddev_plan_time is 0)."); |
203 | 184 |
|
|
0 commit comments