Logo
Explore Help
Sign In
fluencelabs/tendermint
1
0
Fork 0
You've already forked tendermint
mirror of https://github.com/fluencelabs/tendermint synced 2025-05-15 16:11:21 +00:00
Code Issues Projects Releases Wiki Activity
tendermint/tools/tm-bench/bench_test.go

19 lines
257 B
Go
Raw Normal View History

tmbench: Make sendloop act in one second segments (#110) * tmbench: Make sendloop act in one second segments Previous behaviour was to make the sendloop send all its messages and then time how long that took. (Possibly waiting if too fast) This has the same operation when too fast, but stops the loop after one second. This is useful if a large tx amount is specified and the ping doesn't get executed. Tmbench no longer crashes on large rates. * Update Readme
2018-06-28 01:11:05 -07:00
package main
import (
"testing"
"time"
)
func BenchmarkTimingPerTx(b *testing.B) {
startTime := time.Now()
endTime := startTime.Add(time.Second)
for i := 0; i < b.N; i++ {
if i%20 == 0 {
if time.Now().After(endTime) {
continue
}
}
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 448ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API