diff --git a/apinighthawk/nighthawk.go b/apinighthawk/nighthawk.go index c438af0b..9b706b0b 100644 --- a/apinighthawk/nighthawk.go +++ b/apinighthawk/nighthawk.go @@ -41,7 +41,11 @@ func NighthawkRun(config *NighthawkConfig) ([]byte, error) { qps := strconv.FormatFloat(config.QPS, 'f', -1, 64) c := strconv.Itoa(config.Thread) - args := []string{"--rps " + qps, "--concurrency " + c, "--duration " + duration, rURL.String(), "--output-format experimental_fortio_pedantic"} + args := []string{"--rps " + qps, + "--concurrency " + c, + "--duration " + duration, + rURL.String(), + "--output-format experimental_fortio_pedantic"} log.Info("Received arguments for run", args) diff --git a/cmd/main.go b/cmd/main.go index dc2a9e3d..26362cbb 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -17,9 +17,6 @@ func init() { // Output to stdout instead of the default stderr log.SetOutput(os.Stdout) - - // // Output to only for logs above warn level - // log.SetLevel(log.WarnLevel) } func main() { // Duration in seconds nighthawk default format @@ -38,21 +35,12 @@ func main() { log.Fatal(err) } - // fmt.Print(string(result)) - // // res1 := string(result) - var result1 periodic.RunnerResults - // var bd []byte - // hres, _ := res1.(*fhttp.HTTPRunnerResults) - // bd, err = json.Marshal(hres) - // result1 = hres.Result() - - err = json.Unmarshal([]byte(result), &result1) + err = json.Unmarshal(result, &result1) if err != nil { err = errors.Wrap(err, "Error while unmarshaling Nighthawk results to the FortioHTTPRunner") - // logrus.Error(err) log.Fatal(err) } @@ -61,10 +49,8 @@ func main() { if err != nil { err = errors.Wrap(err, "Error while unmarshaling Nighthawk results to map") - // log.Error(err) log.Fatal(err) } log.Infof("Mapped version of the test: %+#v", resultsMap) - }