@@ -470,11 +470,6 @@ func (p *processHandleMock) TimesWithContext(ctx context.Context) (*cpu.TimesSta
470
470
return args .Get (0 ).(* cpu.TimesStat ), args .Error (1 )
471
471
}
472
472
473
- func (p * processHandleMock ) PercentWithContext (ctx context.Context , d time.Duration ) (float64 , error ) {
474
- args := p .MethodCalled ("PercentWithContext" , ctx , d )
475
- return args .Get (0 ).(float64 ), args .Error (1 )
476
- }
477
-
478
473
func (p * processHandleMock ) MemoryInfoWithContext (ctx context.Context ) (* process.MemoryInfoStat , error ) {
479
474
args := p .MethodCalled ("MemoryInfoWithContext" , ctx )
480
475
return args .Get (0 ).(* process.MemoryInfoStat ), args .Error (1 )
@@ -500,11 +495,6 @@ func (p *processHandleMock) CreateTimeWithContext(ctx context.Context) (int64, e
500
495
return args .Get (0 ).(int64 ), args .Error (1 )
501
496
}
502
497
503
- func (p * processHandleMock ) ParentWithContext (ctx context.Context ) (* process.Process , error ) {
504
- args := p .MethodCalled ("ParentWithContext" , ctx )
505
- return args .Get (0 ).(* process.Process ), args .Error (1 )
506
- }
507
-
508
498
func (p * processHandleMock ) PpidWithContext (ctx context.Context ) (int32 , error ) {
509
499
args := p .MethodCalled ("PpidWithContext" , ctx )
510
500
return args .Get (0 ).(int32 ), args .Error (1 )
@@ -551,9 +541,6 @@ func initDefaultsHandleMock(t mock.TestingT, handleMock *processHandleMock) {
551
541
if ! handleMock .IsMethodCallable (t , "TimesWithContext" , mock .Anything ) {
552
542
handleMock .On ("TimesWithContext" , mock .Anything ).Return (& cpu.TimesStat {}, nil )
553
543
}
554
- if ! handleMock .IsMethodCallable (t , "PercentWithContext" , mock .Anything , mock .Anything ) {
555
- handleMock .On ("PercentWithContext" , mock .Anything , mock .Anything ).Return (float64 (0 ), nil )
556
- }
557
544
if ! handleMock .IsMethodCallable (t , "MemoryInfoWithContext" , mock .Anything ) {
558
545
handleMock .On ("MemoryInfoWithContext" , mock .Anything ).Return (& process.MemoryInfoStat {}, nil )
559
546
}
@@ -949,7 +936,6 @@ func TestScrapeMetrics_ProcessErrors(t *testing.T) {
949
936
handleMock .On ("CmdlineWithContext" , mock .Anything ).Return ("cmdline" , test .cmdlineError )
950
937
handleMock .On ("CmdlineSliceWithContext" , mock .Anything ).Return ([]string {"cmdline" }, test .cmdlineError )
951
938
handleMock .On ("TimesWithContext" , mock .Anything ).Return (& cpu.TimesStat {}, test .timesError )
952
- handleMock .On ("PercentWithContext" , mock .Anything ).Return (float64 (0 ), nil )
953
939
handleMock .On ("MemoryInfoWithContext" , mock .Anything ).Return (& process.MemoryInfoStat {}, test .memoryInfoError )
954
940
handleMock .On ("MemoryPercentWithContext" , mock .Anything ).Return (float32 (0 ), test .memoryPercentError )
955
941
handleMock .On ("IOCountersWithContext" , mock .Anything ).Return (& process.IOCountersStat {}, test .ioCountersError )
@@ -1263,7 +1249,6 @@ func newErroringHandleMock() *processHandleMock {
1263
1249
handleMock .On ("CmdlineWithContext" , mock .Anything ).Return ("cmdline" , nil )
1264
1250
handleMock .On ("CmdlineSliceWithContext" , mock .Anything ).Return ([]string {"cmdline" }, nil )
1265
1251
handleMock .On ("TimesWithContext" , mock .Anything ).Return (& cpu.TimesStat {}, & ProcessReadError {})
1266
- handleMock .On ("PercentWithContext" , mock .Anything ).Return (float64 (0 ), nil )
1267
1252
handleMock .On ("MemoryInfoWithContext" , mock .Anything ).Return (& process.MemoryInfoStat {}, & ProcessReadError {})
1268
1253
handleMock .On ("IOCountersWithContext" , mock .Anything ).Return (& process.IOCountersStat {}, & ProcessReadError {})
1269
1254
handleMock .On ("NumThreadsWithContext" , mock .Anything ).Return (int32 (0 ), & ProcessReadError {})
0 commit comments