Skip to content

Commit 982878f

Browse files
Feat/Introduce the TxPool load tool (#8)
* code from branch feat/txpool-refactoring * Refactor transaction message reading to include a timeout parameter and enhance error handling for timeout scenarios in the MeasurePropagationLatencies function. * Update task descriptors to include tx_pool_latency_analysis and replace tx_poolthroughputanalysis with tx_pool_latency_analysis for improved task management. * Refactor tx_pool_latency_analysis and tx_pool_throughput_analysis to replace 'measureInterval' with 'logInterval' for consistency. Update related documentation and configuration files to reflect this change, and adjust TPS values in playbooks for improved testing scenarios. * Fix timeout handling in MeasurePropagationLatencies function by breaking the loop on timeoutExpired error instead of returning the result. This improves error handling during p2p event reading. --------- Co-authored-by: tosettil-polimi <info@tosettil.me>
1 parent bf1406b commit 982878f

File tree

10 files changed

+470
-557
lines changed

10 files changed

+470
-557
lines changed

pkg/coordinator/tasks/tasks.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ import (
3838
runtaskoptions "github.com/noku-team/assertoor/pkg/coordinator/tasks/run_task_options"
3939
runtasks "github.com/noku-team/assertoor/pkg/coordinator/tasks/run_tasks"
4040
runtasksconcurrent "github.com/noku-team/assertoor/pkg/coordinator/tasks/run_tasks_concurrent"
41-
txpoollatencyanalysis "github.com/noku-team/assertoor/pkg/coordinator/tasks/tx_pool_latency_analysis"
42-
txpoolthroughputanalysis "github.com/noku-team/assertoor/pkg/coordinator/tasks/tx_pool_throughput_analysis"
43-
txpoolclean "github.com/noku-team/assertoor/pkg/coordinator/tasks/tx_pool_clean"
4441
sleep "github.com/noku-team/assertoor/pkg/coordinator/tasks/sleep"
42+
txpoolclean "github.com/noku-team/assertoor/pkg/coordinator/tasks/tx_pool_clean"
43+
txpoolthroughputanalysis "github.com/noku-team/assertoor/pkg/coordinator/tasks/tx_pool_throughput_analysis"
44+
txpoollatencyanalysis "github.com/noku-team/assertoor/pkg/coordinator/tasks/tx_pool_latency_analysis"
4545
)
4646

4747
var AvailableTaskDescriptors = []*types.TaskDescriptor{

pkg/coordinator/tasks/tx_pool_latency_analysis/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The `tx_pool_latency_analysis` task evaluates latency of transaction processing
1515
- **`duration_s`**:
1616
The test duration (the number of transactions to send is calculated as `tps * duration_s`).
1717

18-
- **`measureInterval`**:
18+
- **`logInterval`**:
1919
The interval at which the script logs progress (e.g., every 100 transactions).
2020

2121
### Outputs
@@ -37,9 +37,9 @@ The `tx_pool_latency_analysis` task evaluates latency of transaction processing
3737
```yaml
3838
- name: tx_pool_latency_analysis
3939
config:
40-
tps: 100
40+
tps: 1000
4141
duration_s: 10
42-
measureInterval: 1000
42+
logInterval: 1000
4343
configVars:
4444
privateKey: "walletPrivkey"
4545
```

pkg/coordinator/tasks/tx_pool_latency_analysis/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
package txpoollatencyanalysis
1+
package txpool_latency_analysis
22

33
type Config struct {
44
PrivateKey string `yaml:"privateKey" json:"privateKey"`
55

66
TPS int `yaml:"tps" json:"tps"`
77
Duration_s int `yaml:"duration_s" json:"duration_s"`
8-
MeasureInterval int `yaml:"measureInterval" json:"measureInterval"`
8+
LogInterval int `yaml:"logInterval" json:"logInterval"`
99
SecondsBeforeRunning int64 `yaml:"secondsBeforeRunning" json:"secondsBeforeRunning"`
1010
}
1111

1212
func DefaultConfig() Config {
1313
return Config{
1414
TPS: 100,
1515
Duration_s: 60,
16-
MeasureInterval: 100,
16+
LogInterval: 100,
1717
SecondsBeforeRunning: 0,
1818
}
1919
}

0 commit comments

Comments
 (0)