Class: StatsPerMethod

Inherits:
Object show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/pb/test/xds_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatsPerMethod

Returns a new instance of StatsPerMethod.



102
103
104
105
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/pb/test/xds_client.rb', line 102

def initialize()
  @rpcs_started = 0
  @result = Hash.new(0)
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



101
102
103
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/pb/test/xds_client.rb', line 101

def result
  @result
end

#rpcs_startedObject (readonly)

Returns the value of attribute rpcs_started.



101
102
103
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/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 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/pb/test/xds_client.rb', line 109

def add_result(status_code)
  @result[status_code] += 1
end

#increment_rpcs_startedObject



106
107
108
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/grpc-1.50.0-x86_64-linux/src/ruby/pb/test/xds_client.rb', line 106

def increment_rpcs_started()
  @rpcs_started += 1
end