Class: Groonga::DatabaseInspector::Reporter
- Inherits:
-
Object
- Object
- Groonga::DatabaseInspector::Reporter
- Defined in:
- lib/groonga/database-inspector.rb
Instance Method Summary collapse
-
#initialize(database, options, output) ⇒ Reporter
constructor
A new instance of Reporter.
- #report ⇒ Object
Constructor Details
#initialize(database, options, output) ⇒ Reporter
Returns a new instance of Reporter.
67 68 69 70 71 72 73 |
# File 'lib/groonga/database-inspector.rb', line 67 def initialize(database, , output) @database = database @context = @database.context = @output = output @indent_width = 0 end |
Instance Method Details
#report ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/groonga/database-inspector.rb', line 75 def report write("Database\n") indent do write("Path: #{inspect_path(@database.path)}\n") write("Total disk usage: " + "#{inspect_disk_usage(total_disk_usage)}\n") write("Disk usage: " + "#{inspect_sub_disk_usage(@database.disk_usage)}\n") write("N records: #{count_total_n_records}\n") write("N tables: #{count_n_tables}\n") write("N columns: #{count_total_n_columns}\n") report_plugins report_tables end end |