File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed 
main/java/com/google/firebase/perf/session/gauges 
test/java/com/google/firebase/perf/session/gauges Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ private synchronized void scheduleCpuMetricCollectionOnce(Timer referenceTime) {
186186                CpuMetricReading  currCpuReading  = syncCollectCpuMetric (referenceTime );
187187                if  (currCpuReading  != null ) {
188188                  cpuMetricReadings .add (currCpuReading );
189+                   GaugeCounter .INSTANCE .incrementCounter ();
189190                }
190191              },
191192              /* initialDelay */  0 ,
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ private synchronized void scheduleMemoryMetricCollectionOnce(Timer referenceTime
149149                AndroidMemoryReading  memoryReading  = syncCollectMemoryMetric (referenceTime );
150150                if  (memoryReading  != null ) {
151151                  memoryMetricReadings .add (memoryReading );
152+                   GaugeCounter .INSTANCE .incrementCounter ();
152153                }
153154              },
154155              /* initialDelay */  0 ,
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ public void testGaugeCounterStartsAJobToConsumeTheGeneratedMetrics() throws Inte
335335    PerfSession  fakeSession  = createTestSession (1 );
336336    testGaugeManager .setApplicationProcessState (ApplicationProcessState .FOREGROUND );
337337    testGaugeManager .startCollectingGauges (fakeSession );
338-     GaugeCounter .INSTANCE . setGaugeManager (testGaugeManager );
338+     GaugeCounter .setGaugeManager (testGaugeManager );
339339
340340    // There's no job to log the gauges. 
341341    assertThat (fakeScheduledExecutorService .isEmpty ()).isTrue ();
@@ -377,7 +377,7 @@ public void testUpdateAppStateHandlesMultipleAppStates() {
377377    fakeSession .setGaugeAndEventCollectionEnabled (true );
378378    testGaugeManager .setApplicationProcessState (ApplicationProcessState .FOREGROUND );
379379    testGaugeManager .startCollectingGauges (fakeSession );
380-     GaugeCounter .INSTANCE . setGaugeManager (testGaugeManager );
380+     GaugeCounter .setGaugeManager (testGaugeManager );
381381
382382    // Generate metrics that don't exceed the GaugeCounter.MAX_COUNT. 
383383    generateMetricsAndIncrementCounter (10 );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments