mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-04 07:07:13 +00:00
* Extend the load report tool to include transactions' hashes (#9509)
* Add transaction hash to raw data
* Add hash in formatted output
* Cosmetic
(cherry picked from commit cdd3479f20)
# Conflicts:
# test/loadtime/cmd/report/main.go
* Resolve conflict
* Appease linter
Co-authored-by: Sergio Mena <sergio@informal.systems>
This commit is contained in:
co-authored by
Sergio Mena
parent
bda1dd4734
commit
df5ba80914
@@ -87,7 +87,7 @@ func toCSVRecords(rs []report.Report) [][]string {
|
||||
}
|
||||
res := make([][]string, total+1)
|
||||
|
||||
res[0] = []string{"experiment_id", "duration_ns", "block_time", "connections", "rate", "size"}
|
||||
res[0] = []string{"experiment_id", "block_time", "duration_ns", "tx_hash", "connections", "rate", "size"}
|
||||
offset := 1
|
||||
for _, r := range rs {
|
||||
idStr := r.ID.String()
|
||||
@@ -95,7 +95,7 @@ func toCSVRecords(rs []report.Report) [][]string {
|
||||
rateStr := strconv.FormatInt(int64(r.Rate), 10)
|
||||
sizeStr := strconv.FormatInt(int64(r.Size), 10)
|
||||
for i, v := range r.All {
|
||||
res[offset+i] = []string{idStr, strconv.FormatInt(int64(v.Duration), 10), strconv.FormatInt(v.BlockTime.UnixNano(), 10), connStr, rateStr, sizeStr} //nolint: lll
|
||||
res[offset+i] = []string{idStr, strconv.FormatInt(v.BlockTime.UnixNano(), 10), strconv.FormatInt(int64(v.Duration), 10), fmt.Sprintf("%X", v.Hash), connStr, rateStr, sizeStr} //nolint: lll
|
||||
}
|
||||
offset += len(r.All)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user