@@ -143,7 +143,7 @@ public void testRequestIntervalLess() {
143
143
ClientCall <OrcaLoadReportRequest , OrcaLoadReport > call = channel .newCall (
144
144
OpenRcaServiceGrpc .getStreamCoreMetricsMethod (), CallOptions .DEFAULT );
145
145
defaultTestService .putUtilizationMetric ("buffer" , 0.2 );
146
- defaultTestService .setQps (1.9 );
146
+ defaultTestService .setQpsMetric (1.9 );
147
147
call .start (listener , new Metadata ());
148
148
call .sendMessage (OrcaLoadReportRequest .newBuilder ()
149
149
.setReportInterval (Duration .newBuilder ().setSeconds (0 ).setNanos (500 ).build ()).build ());
@@ -154,7 +154,7 @@ public void testRequestIntervalLess() {
154
154
verify (listener ).onMessage (eq (expect ));
155
155
reset (listener );
156
156
defaultTestService .removeUtilizationMetric ("buffer0" );
157
- defaultTestService .clearQps ();
157
+ defaultTestService .clearQpsMetric ();
158
158
assertThat (fakeClock .forwardTime (500 , TimeUnit .NANOSECONDS )).isEqualTo (0 );
159
159
verifyNoInteractions (listener );
160
160
assertThat (fakeClock .forwardTime (1 , TimeUnit .SECONDS )).isEqualTo (1 );
@@ -255,14 +255,14 @@ public void testApis() throws Exception {
255
255
defaultTestService .setMemoryUtilizationMetric (goldenReport .getMemUtilization ());
256
256
defaultTestService .setAllUtilizationMetrics (firstUtilization );
257
257
defaultTestService .putUtilizationMetric ("queue" , 1.0 );
258
- defaultTestService .setQps (1239.01 );
258
+ defaultTestService .setQpsMetric (1239.01 );
259
259
Iterator <OrcaLoadReport > reports = OpenRcaServiceGrpc .newBlockingStub (channel )
260
260
.streamCoreMetrics (OrcaLoadReportRequest .newBuilder ().build ());
261
261
assertThat (reports .next ()).isEqualTo (goldenReport );
262
262
263
263
defaultTestService .clearCpuUtilizationMetric ();
264
264
defaultTestService .clearMemoryUtilizationMetric ();
265
- defaultTestService .clearQps ();
265
+ defaultTestService .clearQpsMetric ();
266
266
fakeClock .forwardTime (1 , TimeUnit .SECONDS );
267
267
goldenReport = OrcaLoadReport .newBuilder ()
268
268
.putAllUtilization (firstUtilization )
@@ -279,7 +279,7 @@ public void testApis() throws Exception {
279
279
defaultTestService .setCpuUtilizationMetric (1.001 );
280
280
defaultTestService .setMemoryUtilizationMetric (-0.001 );
281
281
defaultTestService .setMemoryUtilizationMetric (1.001 );
282
- defaultTestService .setQps (-0.001 );
282
+ defaultTestService .setQpsMetric (-0.001 );
283
283
defaultTestService .putUtilizationMetric ("util-out-of-range" , -0.001 );
284
284
defaultTestService .putUtilizationMetric ("util-out-of-range" , 1.001 );
285
285
fakeClock .forwardTime (1 , TimeUnit .SECONDS );
0 commit comments