From 938a01ef31bdbcd435794f721af74a6591e30968 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Wed, 19 Jan 2022 15:03:04 +0800 Subject: [PATCH] change: update docs --- docs/CHANGELOG.md | 5 ++++- internal/boomer/stats.go | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index ebe1594..39453cc 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,8 +1,11 @@ # Release History -## v0.5.2 (2022-01-16) +## v0.5.2 (2022-01-19) - feat: support creating and calling custom functions with [hashicorp/go-plugin](https://github.com/hashicorp/go-plugin) +- feat: add scaffold demo with hashicorp plugin +- feat: report events for initializing plugin +- fix: log failures when the assertion failed ## v0.5.1 (2022-01-13) diff --git a/internal/boomer/stats.go b/internal/boomer/stats.go index 57af965..fbf7b28 100644 --- a/internal/boomer/stats.go +++ b/internal/boomer/stats.go @@ -66,7 +66,7 @@ func (s *requestStats) logTransaction(name string, success bool, responseTime in s.transactionPassed++ } else { s.transactionFailed++ - s.get(name, "transaction").logError("") + s.get(name, "transaction").logFailures() } s.get(name, "transaction").log(responseTime, contentLength) } @@ -77,8 +77,8 @@ func (s *requestStats) logRequest(method, name string, responseTime int64, conte } func (s *requestStats) logError(method, name, err string) { - s.total.logError(err) - s.get(name, method).logError(err) + s.total.logFailures() + s.get(name, method).logFailures() // store error in errors map key := genMD5(method, name, err) @@ -264,7 +264,7 @@ func (s *statsEntry) logResponseTime(responseTime int64) { } } -func (s *statsEntry) logError(err string) { +func (s *statsEntry) logFailures() { s.NumFailures++ key := time.Now().Unix() _, ok := s.NumFailPerSec[key]