Skip to content

Commit 9b9d8c1

Browse files
committed
Comment non-used function add missing includes
1 parent 4397886 commit 9b9d8c1

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

sdk/include/opentelemetry/sdk/metrics/aggregation/base2_exponential_histogram_aggregation.h

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33

44
#pragma once
55

6+
#include <memory>
7+
#include <mutex>
8+
69
#include "opentelemetry/common/spin_lock_mutex.h"
7-
#include "opentelemetry/sdk/metrics/aggregation/aggregation.h"
810
#include "opentelemetry/sdk/metrics/aggregation/aggregation_config.h"
11+
#include "opentelemetry/sdk/metrics/aggregation/aggregation.h"
912
#include "opentelemetry/sdk/metrics/aggregation/base2_exponential_histogram_indexer.h"
10-
11-
#include <memory>
12-
#include <mutex>
13+
#include "opentelemetry/sdk/metrics/data/circular_buffer.h"
14+
#include "opentelemetry/sdk/metrics/data/metric_data.h"
15+
#include "opentelemetry/sdk/metrics/data/point_data.h"
1316

1417
OPENTELEMETRY_BEGIN_NAMESPACE
1518
namespace sdk

sdk/include/opentelemetry/sdk/metrics/aggregation/base2_exponential_histogram_indexer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
#pragma once
55

6-
#include "opentelemetry/version.h"
6+
#include <stdint.h>
77

8-
#include <cstdint>
8+
#include "opentelemetry/version.h"
99

1010
OPENTELEMETRY_BEGIN_NAMESPACE
1111
namespace sdk

sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc

+13-13
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ uint32_t GetScaleReduction(int32_t start_index, int32_t end_index, size_t max_bu
3737
return scale_reduction;
3838
}
3939

40-
uint32_t GetScaleReduction(const AdaptingCircularBufferCounter &first,
41-
const AdaptingCircularBufferCounter &second,
42-
size_t max_buckets)
43-
{
44-
if (first.Empty() || second.Empty())
45-
{
46-
return 0;
47-
}
48-
49-
const int32_t start_index = std::min(first.StartIndex(), second.StartIndex());
50-
const int32_t end_index = std::max(first.EndIndex(), second.EndIndex());
51-
return GetScaleReduction(start_index, end_index, max_buckets);
52-
}
40+
// Commented out as it is not used
41+
// uint32_t GetScaleReduction(const AdaptingCircularBufferCounter &first,
42+
// const AdaptingCircularBufferCounter &second,
43+
// size_t max_buckets)
44+
// {
45+
// if (first.Empty() || second.Empty())
46+
// {
47+
// return 0;
48+
// }
49+
// const int32_t start_index = std::min(first.StartIndex(), second.StartIndex());
50+
// const int32_t end_index = std::max(first.EndIndex(), second.EndIndex());
51+
// return GetScaleReduction(start_index, end_index, max_buckets);
52+
// }
5353

5454
void DownscaleBuckets(AdaptingCircularBufferCounter *buckets, uint32_t by) noexcept
5555
{

0 commit comments

Comments
 (0)