MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / setupBenchmarkConfig

Function setupBenchmarkConfig

transaction_benchmark_test.go:34–57  ·  view source on GitHub ↗

setupBenchmarkConfig creates and stores a test configuration

()

Source from the content-addressed store, hash-verified

32
33// setupBenchmarkConfig creates and stores a test configuration
34func setupBenchmarkConfig() *config.Configuration {
35 cnf := &config.Configuration{
36 Redis: config.RedisConfig{
37 Dns: "localhost:6379",
38 },
39 Queue: config.QueueConfig{
40 WebhookQueue: "webhook_queue",
41 TransactionQueue: "transaction_queue",
42 IndexQueue: "index_queue",
43 InflightExpiryQueue: "inflight_expiry_queue",
44 NumberOfQueues: 1,
45 },
46 Server: config.ServerConfig{SecretKey: "benchmark-secret-key"},
47 Transaction: config.TransactionConfig{
48 BatchSize: 100000,
49 MaxQueueSize: 1000,
50 MaxWorkers: 10,
51 LockDuration: 30 * time.Second,
52 IndexQueuePrefix: "transactions",
53 },
54 }
55 config.ConfigStore.Store(cnf)
56 return cnf
57}
58
59// createTestBalance creates a test balance with the given ID and amount
60func createTestBalance(id string, balance int64) *model.Balance {

Calls

no outgoing calls

Tested by

no test coverage detected