vincentalfred commented on issue #3982: Add Traffic Monitor gbps calculated 
stat.
URL: https://github.com/apache/trafficcontrol/pull/3982#issuecomment-542658060
 
 
   I write something like this for the test, but I don't know why it doesn't 
work.
   ```
   func TestComputeStatGbps(t *testing.T) {
        computedStats := ComputedStats()
        got := computedStats["gbps"](info: ResultInfo{Vitals: Vitals{KbpsOut: 
1500000}})
        want := 1.5
        if got != want {
                t.Errorf("ComputedStats[\"gbps\"] return %v instead of %v", 
got, want)
        }
   
        got = computedStats["gbps"](info: ResultInfo{Vitals: Vitals{KbpsOut: 
1400000}})
        want = 1.4
        if got != want {
                t.Errorf("ComputedStats[\"gbps\"] return %v instead of %v", 
got, want)
        }
   }
   ```
   This is the error message I got:
   ```
   # command-line-arguments
   cache_test.go:55:35: missing ',' in argument list
   cache_test.go:61:34: missing ',' in argument list
   FAIL command-line-arguments [setup failed]
   FAIL
   ```
   Sorry to trouble you. Thank you for being so patient.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to