firehol/netdata

View on GitHub
src/go/plugin/go.d/modules/gearman/collect.go

Summary

Maintainability
B
4 hrs
Test Coverage

Method Gearman.collectStatus has 57 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (g *Gearman) collectStatus(mx map[string]int64, statusData []byte) error {
    /*
        Same output as the "gearadmin --status" command:

        FUNCTION\tTOTAL\tRUNNING\tAVAILABLE_WORKERS
Severity: Minor
Found in src/go/plugin/go.d/modules/gearman/collect.go - About 1 hr to fix

    Method Gearman.collectPriorityStatus has 53 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (g *Gearman) collectPriorityStatus(mx map[string]int64, prioStatusData []byte) error {
        /*
            Same output as the "gearadmin --priority-status" command:
    
            FUNCTION\tHIGH\tNORMAL\tLOW\tAVAILABLE_WORKERS
    Severity: Minor
    Found in src/go/plugin/go.d/modules/gearman/collect.go - About 1 hr to fix

      Method Gearman.collect has 6 return statements (exceeds 4 allowed).
      Open

      func (g *Gearman) collect() (map[string]int64, error) {
          if g.conn == nil {
              conn, err := g.establishConn()
              if err != nil {
                  return nil, err
      Severity: Major
      Found in src/go/plugin/go.d/modules/gearman/collect.go - About 40 mins to fix

        Method Gearman.collectStatus has 5 return statements (exceeds 4 allowed).
        Open

        func (g *Gearman) collectStatus(mx map[string]int64, statusData []byte) error {
            /*
                Same output as the "gearadmin --status" command:
        
                FUNCTION\tTOTAL\tRUNNING\tAVAILABLE_WORKERS
        Severity: Major
        Found in src/go/plugin/go.d/modules/gearman/collect.go - About 35 mins to fix

          Method Gearman.collectPriorityStatus has 5 return statements (exceeds 4 allowed).
          Open

          func (g *Gearman) collectPriorityStatus(mx map[string]int64, prioStatusData []byte) error {
              /*
                  Same output as the "gearadmin --priority-status" command:
          
                  FUNCTION\tHIGH\tNORMAL\tLOW\tAVAILABLE_WORKERS
          Severity: Major
          Found in src/go/plugin/go.d/modules/gearman/collect.go - About 35 mins to fix

            There are no issues that match your filters.

            Category
            Status