Class: SimpleRecord::Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/simple_record/stats.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStats

Returns a new instance of Stats.



5
6
7
8
9
10
11
12
# File 'lib/simple_record/stats.rb', line 5

def initialize
    @selects = 0
    @saves = 0
    @deletes = 0
    @s3_puts = 0
    @s3_gets = 0
    @s3_deletes = 0
end

Instance Attribute Details

#deletesObject

Returns the value of attribute deletes.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def deletes
  @deletes
end

#s3_deletesObject

Returns the value of attribute s3_deletes.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def s3_deletes
  @s3_deletes
end

#s3_getsObject

Returns the value of attribute s3_gets.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def s3_gets
  @s3_gets
end

#s3_putsObject

Returns the value of attribute s3_puts.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def s3_puts
  @s3_puts
end

#savesObject

Returns the value of attribute saves.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def saves
  @saves
end

#selectsObject

Returns the value of attribute selects.



3
4
5
# File 'lib/simple_record/stats.rb', line 3

def selects
  @selects
end

Instance Method Details

#clearObject



14
15
16
17
18
19
20
21
# File 'lib/simple_record/stats.rb', line 14

def clear
    self.selects = 0
    self.saves = 0
    self.deletes = 0
    self.s3_puts = 0
    self.s3_gets = 0
    self.s3_deletes = 0
end