mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-09 22:44:05 +08:00
change: add warn logs
This commit is contained in:
@@ -97,6 +97,7 @@ func (b *Boomer) Run(tasks ...*Task) {
|
|||||||
// RecordTransaction reports a transaction stat.
|
// RecordTransaction reports a transaction stat.
|
||||||
func (b *Boomer) RecordTransaction(name string, success bool, elapsedTime int64, contentSize int64) {
|
func (b *Boomer) RecordTransaction(name string, success bool, elapsedTime int64, contentSize int64) {
|
||||||
if b.localRunner == nil {
|
if b.localRunner == nil {
|
||||||
|
log.Warn().Msg("boomer not initialized")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
b.localRunner.stats.transactionChan <- &transaction{
|
b.localRunner.stats.transactionChan <- &transaction{
|
||||||
@@ -110,6 +111,7 @@ func (b *Boomer) RecordTransaction(name string, success bool, elapsedTime int64,
|
|||||||
// RecordSuccess reports a success.
|
// RecordSuccess reports a success.
|
||||||
func (b *Boomer) RecordSuccess(requestType, name string, responseTime int64, responseLength int64) {
|
func (b *Boomer) RecordSuccess(requestType, name string, responseTime int64, responseLength int64) {
|
||||||
if b.localRunner == nil {
|
if b.localRunner == nil {
|
||||||
|
log.Warn().Msg("boomer not initialized")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
b.localRunner.stats.requestSuccessChan <- &requestSuccess{
|
b.localRunner.stats.requestSuccessChan <- &requestSuccess{
|
||||||
@@ -123,6 +125,7 @@ func (b *Boomer) RecordSuccess(requestType, name string, responseTime int64, res
|
|||||||
// RecordFailure reports a failure.
|
// RecordFailure reports a failure.
|
||||||
func (b *Boomer) RecordFailure(requestType, name string, responseTime int64, exception string) {
|
func (b *Boomer) RecordFailure(requestType, name string, responseTime int64, exception string) {
|
||||||
if b.localRunner == nil {
|
if b.localRunner == nil {
|
||||||
|
log.Warn().Msg("boomer not initialized")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
b.localRunner.stats.requestFailureChan <- &requestFailure{
|
b.localRunner.stats.requestFailureChan <- &requestFailure{
|
||||||
@@ -135,5 +138,9 @@ func (b *Boomer) RecordFailure(requestType, name string, responseTime int64, exc
|
|||||||
|
|
||||||
// Quit will send a quit message to the master.
|
// Quit will send a quit message to the master.
|
||||||
func (b *Boomer) Quit() {
|
func (b *Boomer) Quit() {
|
||||||
|
if b.localRunner == nil {
|
||||||
|
log.Warn().Msg("boomer not initialized")
|
||||||
|
return
|
||||||
|
}
|
||||||
b.localRunner.close()
|
b.localRunner.close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user