artdaq
v3_04_00
|
A RoutingMasterPolicy which tries to fully load the first receiver, then the second, and so on. More...
Public Member Functions | |
CapacityTestPolicy (fhicl::ParameterSet ps) | |
CapacityTestPolicy Constructor. More... | |
virtual | ~CapacityTestPolicy ()=default |
Default virtual Destructor. | |
detail::RoutingPacket | GetCurrentTable () override |
Apply the policy to the current tokens. More... | |
![]() | |
RoutingMasterPolicy (fhicl::ParameterSet ps) | |
RoutingMasterPolicy Constructor. More... | |
virtual | ~RoutingMasterPolicy ()=default |
Default virtual Destructor. | |
size_t | GetReceiverCount () const |
Get the number of configured receivers. More... | |
size_t | GetMaxNumberOfTokens () const |
Get the largest number of tokens that the RoutingMasterPolicy has seen at any one time. More... | |
void | AddReceiverToken (int rank, unsigned new_slots_free) |
Add a token to the token list. More... | |
void | Reset () |
Reset the policy, setting the next sequence ID to be used to 1, and removing any tokens. | |
Additional Inherited Members | |
![]() | |
std::unique_ptr< std::deque < int > > | getTokensSnapshot () |
Gets the current token list, used for building Routing Tables. | |
void | addUnusedTokens (std::unique_ptr< std::deque< int >> tokens) |
If necessary, return unused tokens to the token list, for subsequent updates. | |
![]() | |
Fragment::sequence_id_t | next_sequence_id_ |
The next sequence ID to be assigned. | |
A RoutingMasterPolicy which tries to fully load the first receiver, then the second, and so on.
Definition at line 11 of file CapacityTest_policy.cc.
|
explicit |
CapacityTestPolicy Constructor.
ps | ParameterSet used to configure the CapacityTestPolicy |
* CapacityTestPolicy accepts the following Parameters: * "tokens_used_per_table_percent" (Default: 50): Percentage of available tokens to be used on each iteration. *
Definition at line 45 of file CapacityTest_policy.cc.
|
overridevirtual |
Apply the policy to the current tokens.
CapacityTestPolicy will assign available tokens from the first receiver, then the second, and so on until it has assigned tokens equal to the inital_token_count * tokens_used_per_table_percent / 100. The idea is that in steady-state, the load on the receivers should reflect the workload relative to the capacity of the system. (i.e. if you have 5 receivers, and 3 of them are 100% busy, then your load factor is approximately 60%.)
Implements artdaq::RoutingMasterPolicy.
Definition at line 50 of file CapacityTest_policy.cc.