Class: Bpfql::Query::ProbeOption
- Inherits:
-
Struct
- Object
- Struct
- Bpfql::Query::ProbeOption
- Defined in:
- lib/bpfql/query.rb
Instance Attribute Summary collapse
-
#arg1 ⇒ Object
Returns the value of attribute arg1.
-
#arg2 ⇒ Object
Returns the value of attribute arg2.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(probe) ⇒ ProbeOption
constructor
A new instance of ProbeOption.
- #kprobe? ⇒ Boolean
- #to_s ⇒ Object
- #tracepoint? ⇒ Boolean
- #uprobe? ⇒ Boolean
- #usdt? ⇒ Boolean
Constructor Details
#initialize(probe) ⇒ ProbeOption
Returns a new instance of ProbeOption.
45 46 47 48 |
# File 'lib/bpfql/query.rb', line 45 def initialize(probe) # FIXME: complcated probe, e.g. uprobe and USDT has 4 sections super(*probe.split(':')) end |
Instance Attribute Details
#arg1 ⇒ Object
Returns the value of attribute arg1
44 45 46 |
# File 'lib/bpfql/query.rb', line 44 def arg1 @arg1 end |
#arg2 ⇒ Object
Returns the value of attribute arg2
44 45 46 |
# File 'lib/bpfql/query.rb', line 44 def arg2 @arg2 end |
#type ⇒ Object
Returns the value of attribute type
44 45 46 |
# File 'lib/bpfql/query.rb', line 44 def type @type end |
Instance Method Details
#kprobe? ⇒ Boolean
54 55 56 |
# File 'lib/bpfql/query.rb', line 54 def kprobe? self.type == "kprobe" end |
#to_s ⇒ Object
66 67 68 |
# File 'lib/bpfql/query.rb', line 66 def to_s [type, arg1, arg2].join ":" end |
#tracepoint? ⇒ Boolean
50 51 52 |
# File 'lib/bpfql/query.rb', line 50 def tracepoint? self.type == "tracepoint" end |
#uprobe? ⇒ Boolean
58 59 60 |
# File 'lib/bpfql/query.rb', line 58 def uprobe? self.type == "uprobe" end |
#usdt? ⇒ Boolean
62 63 64 |
# File 'lib/bpfql/query.rb', line 62 def usdt? self.type == "usdt" end |