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



36
37
38
# File 'lib/memory/sampler.rb', line 36

def cache
  @cache
end

#class_nameObject

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



36
37
38
# File 'lib/memory/sampler.rb', line 36

def class_name
  @class_name
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



36
37
38
# File 'lib/memory/sampler.rb', line 36

def file
  @file
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



36
37
38
# File 'lib/memory/sampler.rb', line 36

def line
  @line
end

#memsizeObject

Returns the value of attribute memsize

Returns:

  • (Object)

    the current value of memsize



36
37
38
# File 'lib/memory/sampler.rb', line 36

def memsize
  @memsize
end

#retainedObject

Returns the value of attribute retained

Returns:

  • (Object)

    the current value of retained



36
37
38
# File 'lib/memory/sampler.rb', line 36

def retained
  @retained
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



36
37
38
# File 'lib/memory/sampler.rb', line 36

def value
  @value
end

Class Method Details

.unpack(cache, fields) ⇒ Object



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

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

Instance Method Details

#gemObject



41
42
43
# File 'lib/memory/sampler.rb', line 41

def gem
	cache.guess_gem(file)
end

#locationObject



37
38
39
# File 'lib/memory/sampler.rb', line 37

def location
	cache.lookup_location(file, line)
end

#packObject



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

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