Class: Memory::Allocation

Inherits:
Struct
  • Object
show all
Defined in:
lib/memory/sampler.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cacheObject

Returns the value of attribute cache

Returns:

  • (Object)

    the current value of cache



43
44
45
# File 'lib/memory/sampler.rb', line 43

def cache
  @cache
end

#class_nameObject

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



43
44
45
# File 'lib/memory/sampler.rb', line 43

def class_name
  @class_name
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



43
44
45
# File 'lib/memory/sampler.rb', line 43

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



43
44
45
# File 'lib/memory/sampler.rb', line 43

def line
  @line
end

#memsizeObject

Returns the value of attribute memsize

Returns:

  • (Object)

    the current value of memsize



43
44
45
# File 'lib/memory/sampler.rb', line 43

def memsize
  @memsize
end

#retainedObject

Returns the value of attribute retained

Returns:

  • (Object)

    the current value of retained



43
44
45
# File 'lib/memory/sampler.rb', line 43

def retained
  @retained
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



43
44
45
# File 'lib/memory/sampler.rb', line 43

def value
  @value
end

Class Method Details

.unpack(cache, fields) ⇒ Object



56
57
58
# File 'lib/memory/sampler.rb', line 56

def self.unpack(cache, fields)
  self.new(cache, *fields)
end

Instance Method Details

#gemObject



48
49
50
# File 'lib/memory/sampler.rb', line 48

def gem
  cache.guess_gem(file)
end

#locationObject



44
45
46
# File 'lib/memory/sampler.rb', line 44

def location
  cache.lookup_location(file, line)
end

#packObject



52
53
54
# File 'lib/memory/sampler.rb', line 52

def pack
  [class_name, file, line, memsize, value, retained]
end