-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include Spam Config Defaults (#1657)
- Loading branch information
Showing
4 changed files
with
87 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright (C) 2024, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
package throughput | ||
|
||
import "github.com/ava-labs/hypersdk/auth" | ||
|
||
type Config struct { | ||
uris []string | ||
key *auth.PrivateKey | ||
sZipf float64 | ||
vZipf float64 | ||
txsPerSecond int | ||
minTxsPerSecond int | ||
txsPerSecondStep int | ||
numClients int | ||
numAccounts int | ||
} | ||
|
||
func NewDefaultConfig( | ||
uris []string, | ||
key *auth.PrivateKey, | ||
) *Config { | ||
return &Config{ | ||
uris: uris, | ||
key: key, | ||
sZipf: 1.01, | ||
vZipf: 2.7, | ||
txsPerSecond: 500, | ||
minTxsPerSecond: 100, | ||
txsPerSecondStep: 200, | ||
numClients: 10, | ||
numAccounts: 25, | ||
} | ||
} | ||
|
||
func NewConfig( | ||
uris []string, | ||
key *auth.PrivateKey, | ||
sZipf float64, | ||
vZipf float64, | ||
txsPerSecond int, | ||
minTxsPerSecond int, | ||
txsPerSecondStep int, | ||
numClients int, | ||
numAccounts int, | ||
) *Config { | ||
return &Config{ | ||
uris, | ||
key, | ||
sZipf, | ||
vZipf, | ||
txsPerSecond, | ||
minTxsPerSecond, | ||
txsPerSecondStep, | ||
numClients, | ||
numAccounts, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters