Falcon
Toggle main menu visibility
Loading...
Searching...
No Matches
latency_benchmark.hpp
1
#pragma once
2
3
#include <string>
4
5
#include "iprocessor.hpp"
6
#include "utilities/general.hpp"
7
#include "utilities/time.hpp"
8
9
struct
LatencySample
{
10
int64_t ingested_ns;
11
int64_t benchmarked_ns;
12
};
13
14
class
LatencyBenchmark
:
public
IProcessor
{
15
// CONSTRUCTOR and OVERLOADED METHODS
16
public
:
17
LatencyBenchmark
();
18
void
CreatePorts()
override
;
19
void
Preprocess(
ProcessingContext
& context)
override
;
20
void
Process(
ProcessingContext
& context)
override
;
21
void
Postprocess(
ProcessingContext
& context)
override
;
22
23
// CONSTANTS
24
public
:
25
static
constexpr
size_t
BATCH = 128;
26
27
// DATA PORTS
28
protected
:
29
PortIn<AnyType>
* data_in_port_;
30
31
// VARIABLES
32
protected
:
33
std::ofstream output_file_;
34
std::vector<LatencySample> samples_buffer_;
35
};
IProcessor
Definition
iprocessor.hpp:59
LatencyBenchmark
Definition
latency_benchmark.cpp:11
PortIn
Definition
streamports.hpp:256
ProcessingContext
Definition
runinfo.hpp:248
LatencySample
Definition
latency_benchmark.hpp:9
extensions
falcon-fklab-extensions
processors
latency_benchmark
latency_benchmark.hpp
Generated by
1.18.0