libstatistics_collector
master
Lightweight aggregation utilities to collect statistics and measure message metrics.
include
libstatistics_collector
moving_average_statistics
types.hpp
Go to the documentation of this file.
1
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#ifndef LIBSTATISTICS_COLLECTOR__MOVING_AVERAGE_STATISTICS__TYPES_HPP_
16
#define LIBSTATISTICS_COLLECTOR__MOVING_AVERAGE_STATISTICS__TYPES_HPP_
17
18
#include <cmath>
19
#include <sstream>
20
#include <string>
21
22
#include "
libstatistics_collector/visibility_control.hpp
"
23
24
namespace
libstatistics_collector
25
{
26
namespace
moving_average_statistics
27
{
28
32
struct
LIBSTATISTICS_COLLECTOR_PUBLIC
StatisticData
33
{
34
double
average = std::nan(
""
);
35
double
min = std::nan(
""
);
36
double
max = std::nan(
""
);
37
double
standard_deviation = std::nan(
""
);
38
uint64_t sample_count = 0;
39
};
40
48
LIBSTATISTICS_COLLECTOR_PUBLIC
49
std::string
StatisticsDataToString
(
const
StatisticData
& results);
50
51
}
// namespace moving_average_statistics
52
}
// namespace libstatistics_collector
53
54
#endif // LIBSTATISTICS_COLLECTOR__MOVING_AVERAGE_STATISTICS__TYPES_HPP_
libstatistics_collector
Definition:
collector.hpp:29
libstatistics_collector::moving_average_statistics::StatisticsDataToString
std::string StatisticsDataToString(const StatisticData &results)
visibility_control.hpp
LIBSTATISTICS_COLLECTOR_PUBLIC
#define LIBSTATISTICS_COLLECTOR_PUBLIC
Definition:
visibility_control.hpp:40
libstatistics_collector::moving_average_statistics::StatisticData
Definition:
types.hpp:32
Generated by
1.8.17