Class: MemoryTracker::Stores::GcstatLogfileStore
- Inherits:
-
Object
- Object
- MemoryTracker::Stores::GcstatLogfileStore
- Defined in:
- lib/memory_tracker/stores/gcstat_logfile_store.rb
Instance Method Summary collapse
-
#initialize(logger_class, logfile_path) ⇒ GcstatLogfileStore
constructor
A new instance of GcstatLogfileStore.
- #name ⇒ Object
- #push(request) ⇒ Object
- #stats ⇒ Object
Constructor Details
#initialize(logger_class, logfile_path) ⇒ GcstatLogfileStore
Returns a new instance of GcstatLogfileStore.
4 5 6 7 |
# File 'lib/memory_tracker/stores/gcstat_logfile_store.rb', line 4 def initialize(logger_class, logfile_path) @logger = logger_class.new(logfile_path) @num_lines = 0 end |
Instance Method Details
#name ⇒ Object
9 10 11 |
# File 'lib/memory_tracker/stores/gcstat_logfile_store.rb', line 9 def name :gcstat_logfile end |
#push(request) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/memory_tracker/stores/gcstat_logfile_store.rb', line 13 def push(request) @request = request write_header if @num_lines % 1000 == 0 write_request_log @num_lines += 1 end |
#stats ⇒ Object
21 22 |
# File 'lib/memory_tracker/stores/gcstat_logfile_store.rb', line 21 def stats end |