Skip to content

Commit 1eaed2f

Browse files
committed
change task config
1 parent 11321ed commit 1eaed2f

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

pkg/coordinator/tasks/tx_pool_latency_analysis/README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,33 @@ The `tx_pool_latency_analysis` task evaluates latency of transaction processing
99
- **`privateKey`**:
1010
The private key of the account to use for sending transactions.
1111

12-
- **`txCount`**:
13-
The total number of transactions to send.
12+
- **`tps`**:
13+
The total number of transactions to send in one second.
14+
15+
- **`duration_s`**:
16+
The test duration (the number of transactions to send is calculated as `tps * duration_s`).
1417

1518
- **`measureInterval`**:
1619
The interval at which the script logs progress (e.g., every 100 transactions).
1720

18-
- **`highLatency`**:
19-
The expected average transaction latency in milliseconds.
20-
21-
- **`failOnHighLatency`**:
22-
Whether the task should fail if the measured latency exceeds `highLatency`.
23-
24-
2521
### Outputs
2622

2723
- **`tx_count`**:
2824
The total number of transactions sent.
2925

30-
- **`avg_latency_ms`**:
26+
- **`max_latency_ms`**:
3127
The average latency of the transactions in milliseconds.
3228

3329
### Defaults
3430

3531
```yaml
3632
- name: tx_pool_latency_analysis
3733
config:
38-
txCount: 15000
34+
tps: 100
35+
duration_s: 10
3936
measureInterval: 1000
40-
highLatency: 5000
41-
failOnHighLatency: false
4237
configVars:
43-
privateKey: "tx_pool_latency_analysis"
38+
privateKey: "walletPrivkey"
4439
```
40+
41+

pkg/coordinator/tasks/tx_pool_latency_analysis/config.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ type Config struct {
44
PrivateKey string `yaml:"privateKey" json:"privateKey"`
55

66
QPS int `yaml:"qps" json:"qps"`
7-
TxCount int `yaml:"txCount" json:"txCount"`
7+
Duration_s int `yaml:"duration_s" json:"duration_s"`
88
MeasureInterval int `yaml:"measureInterval" json:"measureInterval"`
9-
HighLatency int64 `yaml:"highLatency" json:"highLatency"`
10-
FailOnHighLatency bool `yaml:"failOnHighLatency" json:"failOnHighLatency"`
119
SecondsBeforeRunning int64 `yaml:"secondsBeforeRunning" json:"secondsBeforeRunning"`
1210
}
1311

1412
func DefaultConfig() Config {
1513
return Config{
16-
QPS: 1000,
17-
TxCount: 1000,
14+
QPS: 100,
15+
Duration_s: 60,
1816
MeasureInterval: 100,
19-
HighLatency: 5000, // in microseconds
20-
FailOnHighLatency: true,
2117
SecondsBeforeRunning: 0,
2218
}
2319
}

pkg/coordinator/tasks/tx_pool_throughput_analysis/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@ The `tx_pool_throughput_analysis` task evaluates the throughput of transaction p
99
- **`privateKey`**:
1010
The private key of the account to use for sending transactions.
1111

12-
- **`qps`**:
12+
- **`tps`**:
1313
The total number of transactions to send in one second.
1414

15+
- **`duration_s`**:
16+
The test duration (the number of transactions to send is calculated as `tps * duration_s`).
17+
1518
- **`measureInterval`**:
1619
The interval at which the script logs progress (e.g., every 100 transactions).
1720

@@ -25,7 +28,8 @@ The `tx_pool_throughput_analysis` task evaluates the throughput of transaction p
2528
```yaml
2629
- name: tx_pool_throughput_analysis
2730
config:
28-
qps: 15000
31+
tps: 100
32+
duration_s: 10
2933
measureInterval: 1000
3034
configVars:
3135
privateKey: "walletPrivkey"

pkg/coordinator/tasks/tx_pool_throughput_analysis/config.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ package txpoolcheck
33
type Config struct {
44
PrivateKey string `yaml:"privateKey" json:"privateKey"`
55

6-
QPS int `yaml:"qps" json:"qps"`
6+
QPS int `yaml:"qps" json:"qps"`
7+
Duration_s int `yaml:"duration_s" json:"duration_s"`
78
MeasureInterval int `yaml:"measureInterval" json:"measureInterval"`
89
SecondsBeforeRunning int `yaml:"secondsBeforeRunning" json:"secondsBeforeRunning"`
910
}
1011

1112
func DefaultConfig() Config {
1213
return Config{
13-
QPS: 1000,
14-
MeasureInterval: 100,
14+
QPS: 100,
15+
Duration_s: 60,
16+
MeasureInterval: 100,
1517
SecondsBeforeRunning: 0,
1618
}
1719
}

0 commit comments

Comments
 (0)