Class: Maatkit::ProfileCompact
- Inherits:
-
Object
- Object
- Maatkit::ProfileCompact
- Defined in:
- lib/maatkit-ruby/mk-profile-compact.rb
Overview
Compact the output from mk-query-profiler.
Maatkit::ProfileCompact.new( array, str, array)
Instance Attribute Summary collapse
-
#config ⇒ Object
/etc/maatkit/maatkit.conf,/etc/maatkit/mk-profile-compact.conf,/home/joel/.maatkit.conf,/home/joel/.mk-profile-compact.conf.
-
#headers ⇒ Object
2000.
-
#help ⇒ Object
TRUE.
-
#mode ⇒ Object
(No # value).
-
#path_to_mk_profile_compact ⇒ Object
Sets the executable path, otherwise the environment path will be used.
-
#queries ⇒ Object
(No # value).
-
#version ⇒ Object
FALSE.
Instance Method Summary collapse
-
#initialize ⇒ ProfileCompact
constructor
Returns a new ProfileCompact Object.
-
#start(options = nil) ⇒ Object
Execute the command.
Constructor Details
#initialize ⇒ ProfileCompact
Returns a new ProfileCompact Object
30 31 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 30 def initialize() end |
Instance Attribute Details
#config ⇒ Object
/etc/maatkit/maatkit.conf,/etc/maatkit/mk-profile-compact.conf,/home/joel/.maatkit.conf,/home/joel/.mk-profile-compact.conf
15 16 17 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 15 def config @config end |
#headers ⇒ Object
2000
16 17 18 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 16 def headers @headers end |
#help ⇒ Object
TRUE
17 18 19 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 17 def help @help end |
#mode ⇒ Object
(No # value)
18 19 20 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 18 def mode @mode end |
#path_to_mk_profile_compact ⇒ Object
Sets the executable path, otherwise the environment path will be used.
25 26 27 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 25 def path_to_mk_profile_compact @path_to_mk_profile_compact end |
#queries ⇒ Object
(No # value)
19 20 21 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 19 def queries @queries end |
#version ⇒ Object
FALSE
20 21 22 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 20 def version @version end |
Instance Method Details
#start(options = nil) ⇒ Object
Execute the command
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/maatkit-ruby/mk-profile-compact.rb', line 36 def start( = nil) tmp = Tempfile.new('tmp') command = option_string() + .to_s + " 2> " + tmp.path success = system(command) if success begin while (line = tmp.readline) line.chomp selected_string = line end rescue EOFError tmp.close end return selected_string else tmp.close! return success end end |