-
Notifications
You must be signed in to change notification settings - Fork 146
Expand file tree
/
Copy pathtest_parameters.hpp
More file actions
62 lines (55 loc) · 1.74 KB
/
test_parameters.hpp
File metadata and controls
62 lines (55 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Concord
//
// Copyright (c) 2018 VMware, Inc. All Rights Reserved.
//
// This product is licensed to you under the Apache 2.0 license (the "License").
// You may not use this product except in compliance with the Apache 2.0
// License.
//
// This product may include a number of subcomponents with separate copyright
// notices and license terms. Your use of these subcomponents is subject to the
// terms and conditions of the subcomponent's license, as noted in the LICENSE
// file.
#ifndef CONCORD_BFT_TEST_PARAMETERS_HPP
#define CONCORD_BFT_TEST_PARAMETERS_HPP
struct ClientParams {
uint32_t numOfOperations = 2800;
uint16_t clientId = 4;
uint16_t numOfReplicas = 4;
uint16_t numOfClients = 1;
uint16_t numOfFaulty = 1;
uint16_t numOfSlow = 0;
std::string configFileName;
bool measurePerfomance = false;
uint16_t get_numOfReplicas() {
return (uint16_t)(3 * numOfFaulty + 2 * numOfSlow + 1);
}
};
enum class PersistencyMode {
Off, // no persistency at all
InMemory, // use in memory module
File, // use file as a storage
MAX_VALUE = File
};
enum class ReplicaBehavior {
Default,
Replica0OneTimeRestartVC,
Replica2PeriodicRestartNoVC,
AllReplicasRandomRestartNoVC,
AllReplicasRandomRestartVC,
MAX_VALUE = AllReplicasRandomRestartVC
};
struct ReplicaParams {
uint16_t replicaId;
uint16_t numOfReplicas = 4;
uint16_t numOfClients = 1;
bool debug = false;
bool viewChangeEnabled = false;
uint32_t viewChangeTimeout = 60000; // ms
uint16_t statusReportTimerMillisec = 20 * 1000; // ms
std::string configFileName;
std::string keysFilePrefix;
PersistencyMode persistencyMode = PersistencyMode::Off;
ReplicaBehavior replicaBehavior = ReplicaBehavior::Default;
};
#endif //CONCORD_BFT_TEST_PARAMETERS_HPP