Class: PGQueryStarterWithDuration
- Inherits:
-
PGQueryStarter
- Object
- PGLogLine
- PGQueryStarter
- PGQueryStarterWithDuration
- Defined in:
- lib/pqa.rb
Constant Summary
Constants inherited from PGLogLine
Instance Attribute Summary
Attributes inherited from PGQueryStarter
Attributes inherited from PGLogLine
#cmd_no, #connection_id, #duration, #ignore, #line_no, #text
Instance Method Summary collapse
- #append_to(queries) ⇒ Object
-
#initialize(text, time_str, unit) ⇒ PGQueryStarterWithDuration
constructor
A new instance of PGQueryStarterWithDuration.
Methods inherited from PGQueryStarter
Methods inherited from PGLogLine
Constructor Details
#initialize(text, time_str, unit) ⇒ PGQueryStarterWithDuration
Returns a new instance of PGQueryStarterWithDuration.
237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/pqa.rb', line 237 def initialize(text, time_str, unit) @time_str = time_str @unit = unit text_match = /[\s]*(query|statement):[\s]*/i.match(text) if text_match super(text_match.post_match, parse_duration(time_str, unit)) else $stderr.puts "Found garbage after Duration line : #{text}" super(text, parse_duration(time_str, unit)) end end |