12#ifndef O2_COMPUTINGQUOTAEVALUATOR_H_
13#define O2_COMPUTINGQUOTAEVALUATOR_H_
29struct ServiceRegistry;
58 std::array<ComputingQuotaOffer, MAX_INFLIGHT_OFFERS>
mOffers;
62 std::array<ComputingQuotaInfo, MAX_INFLIGHT_OFFERS>
mInfos;
struct uv_timer_s uv_timer_t
struct uv_loop_s uv_loop_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
void consume(int taskId, ComputingQuotaConsumer &consumed, std::function< void(ComputingQuotaOffer const &accumulatedConsumed, ComputingQuotaStats &)> &reportConsumedOffer)
void updateOffers(std::vector< ComputingQuotaOffer > &offers, uint64_t now)
now the time (e.g. uv_now) when invoked.
ComputingQuotaStats mStats
std::array< ComputingQuotaInfo, MAX_INFLIGHT_OFFERS > mInfos
Information about a given computing offer (e.g. when it was started to be used)
void handleExpired(std::function< void(ComputingQuotaOffer const &, ComputingQuotaStats const &)> reportExpired)
static constexpr int MAX_INFLIGHT_OFFERS
void dispose(int taskId)
Dispose offers for a given taskId.
std::array< ComputingQuotaOffer, MAX_INFLIGHT_OFFERS > mOffers
All the available offerts.
bool selectOffer(int task, ComputingQuotaRequest const &request, uint64_t now, ComputingQuotaOffer *accumulated=nullptr)
std::vector< ComputingQuotaOfferRef > mExpiredOffers
The offers which expired and need to be given back.
Defining ITS Vertex explicitly as messageable.
std::function< void(int id, std::array< ComputingQuotaOffer, 32 > &, ComputingQuotaStats &, std::function< void(ComputingQuotaOffer const &, ComputingQuotaStats &stats)>)> ComputingQuotaConsumer
std::function< OfferScore(ComputingQuotaOffer const &offer, ComputingQuotaOffer const &accumulated)> ComputingQuotaRequest
Statistics on the offers consumed, expired.