Skip to content

Commit

Permalink
updated capture test stats interface
Browse files Browse the repository at this point in the history
  • Loading branch information
palashmarantas committed Mar 4, 2022
1 parent a2b072b commit 6ead8a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/core/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type YMLParserService interface {

// TestStats is used for servicing stat collection
type TestStats interface {
CaptureTestStats(pid int32, CollectStats bool) error
CaptureTestStats(pid int32, collectStats bool) error
}

// Task is a service to update task status at neuron
Expand Down
4 changes: 2 additions & 2 deletions pkg/service/teststats/teststats.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func New(cfg *config.NucleusConfig, logger lumber.Logger) (*ProcStats, error) {
}

// CaptureTestStats combines the ps stats for each test
func (s *ProcStats) CaptureTestStats(pid int32, CollectStats bool) error {
func (s *ProcStats) CaptureTestStats(pid int32, collectStats bool) error {
ps, err := procfs.New(pid, global.SamplingTime, false)
if err != nil {
s.logger.Errorf("failed to find process stats with pid %d %v", pid, err)
Expand All @@ -52,7 +52,7 @@ func (s *ProcStats) CaptureTestStats(pid int32, CollectStats bool) error {
}
select {
case executionResults := <-s.ExecutionResultInputChannel:
if CollectStats {
if collectStats {
for ind := range executionResults.Results {
// Refactor the impl of below 2 functions using generics when Go 1.18 arrives
// https://www.freecodecamp.org/news/generics-in-golang/
Expand Down

0 comments on commit 6ead8a9

Please sign in to comment.