Class: StatsPerMethod
- Inherits:
-
Object
- Object
- StatsPerMethod
- Defined in:
- src/ruby/pb/test/xds_client.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#rpcs_started ⇒ Object
readonly
Returns the value of attribute rpcs_started.
Instance Method Summary collapse
- #add_result(status_code) ⇒ Object
- #increment_rpcs_started ⇒ Object
-
#initialize ⇒ StatsPerMethod
constructor
A new instance of StatsPerMethod.
Constructor Details
#initialize ⇒ StatsPerMethod
Returns a new instance of StatsPerMethod.
102 103 104 105 |
# File 'src/ruby/pb/test/xds_client.rb', line 102 def initialize() @rpcs_started = 0 @result = Hash.new(0) end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
101 102 103 |
# File 'src/ruby/pb/test/xds_client.rb', line 101 def result @result end |
#rpcs_started ⇒ Object (readonly)
Returns the value of attribute rpcs_started.
101 102 103 |
# File 'src/ruby/pb/test/xds_client.rb', line 101 def rpcs_started @rpcs_started end |
Instance Method Details
#add_result(status_code) ⇒ Object
109 110 111 |
# File 'src/ruby/pb/test/xds_client.rb', line 109 def add_result(status_code) @result[status_code] += 1 end |
#increment_rpcs_started ⇒ Object
106 107 108 |
# File 'src/ruby/pb/test/xds_client.rb', line 106 def increment_rpcs_started() @rpcs_started += 1 end |