Class: Syscall

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, args:, retval:, duration:, timestamp:, pid:) ⇒ Syscall

Returns a new instance of Syscall.



7
8
9
10
11
12
13
14
# File 'lib/tracer.rb', line 7

def initialize(name:, args:, retval:, duration:, timestamp:, pid:)
  @name = name
  @args = args
  @retval = retval
  @duration = duration
  @timestamp = timestamp
  @pid = pid
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



5
6
7
# File 'lib/tracer.rb', line 5

def args
  @args
end

#durationObject (readonly)

Returns the value of attribute duration.



5
6
7
# File 'lib/tracer.rb', line 5

def duration
  @duration
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/tracer.rb', line 5

def name
  @name
end

#pidObject (readonly)

Returns the value of attribute pid.



5
6
7
# File 'lib/tracer.rb', line 5

def pid
  @pid
end

#retvalObject (readonly)

Returns the value of attribute retval.



5
6
7
# File 'lib/tracer.rb', line 5

def retval
  @retval
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



5
6
7
# File 'lib/tracer.rb', line 5

def timestamp
  @timestamp
end

Instance Method Details

#to_sObject



16
17
18
# File 'lib/tracer.rb', line 16

def to_s
  "#{name}(#{args}) = #{retval} <#{duration}s>"
end