Skip to content

Commit

Permalink
Addressing comments from David R.
Browse files Browse the repository at this point in the history
  • Loading branch information
edcdavid committed Nov 8, 2023
1 parent ca9e1fd commit e16f180
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions cnf-certification-test/performance/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package performance

import (
"fmt"
"slices"
"strconv"
"strings"

Expand Down Expand Up @@ -325,15 +326,8 @@ func filterProbeProcesses(allProcesses []*crclient.Process, cut *provider.Contai
}
// remove all exec probes and their children from the process list
for _, p := range allProcesses {
isExecProbeProcess := false
for _, parentProbePid := range execProbeProcesses {
if p.Pid == parentProbePid || p.PPid == parentProbePid {
// this process is part of an exec probe (child or parent), break
isExecProbeProcess = true
break
}
}
if isExecProbeProcess {
if slices.Contains(execProbeProcesses, p.Pid) || slices.Contains(execProbeProcesses, p.PPid) {
// this process is part of an exec probe (child or parent), continue
continue
}
notExecProbeProcesses = append(notExecProbeProcesses, p)
Expand Down

0 comments on commit e16f180

Please sign in to comment.