Project
Loading...
Searching...
No Matches
RateLimiter.h
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
12
#ifndef O2_FRAMERWORK_CORE_RATELIMITER_H
13
#define O2_FRAMERWORK_CORE_RATELIMITER_H
14
15
#include "
Framework/ProcessingContext.h
"
16
#include <cstddef>
17
#include <cstdint>
18
#include <chrono>
19
#include <vector>
20
21
namespace
o2::framework
22
{
23
class
RateLimiter
24
{
25
public
:
26
int
check
(
ProcessingContext
& ctx,
int
maxInFlight,
size_t
minSHM);
27
28
private
:
29
int64_t
mConsumedTimeframes = 0;
30
int64_t
mSentTimeframes = 0;
31
32
std::vector<std::chrono::time_point<std::chrono::system_clock>> mTfTimes;
33
std::chrono::time_point<std::chrono::system_clock> mLastTime, mFirstTime;
34
int64_t
mTimeCountingSince = 0;
35
float
mSmothDelay = 0.f;
36
};
37
}
// namespace o2::framework
38
39
#endif
ProcessingContext.h
int64_t
o2::framework::ProcessingContext
Definition
ProcessingContext.h:27
o2::framework::RateLimiter
Definition
RateLimiter.h:24
o2::framework::RateLimiter::check
int check(ProcessingContext &ctx, int maxInFlight, size_t minSHM)
Definition
RateLimiter.cxx:32
o2::framework
Defining PrimaryVertex explicitly as messageable.
Definition
BunchFilling.h:112
Framework
Core
include
Framework
RateLimiter.h
Generated on Sat Feb 21 2026 17:59:01 for Project by
1.9.8