Coverage Report

Created: 2026-07-08 17:03

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/io/cache/block_file_cache_profile.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "io/cache/block_file_cache_profile.h"
19
20
#include <functional>
21
#include <memory>
22
#include <string>
23
24
#include "common/metrics/doris_metrics.h"
25
26
namespace doris::io {
27
28
14
std::shared_ptr<AtomicStatistics> FileCacheMetrics::report() {
29
14
    std::shared_ptr<AtomicStatistics> output_stats = std::make_shared<AtomicStatistics>();
30
14
    std::lock_guard lock(_mtx);
31
14
    output_stats->num_io_bytes_read_from_cache += _statistics->num_io_bytes_read_from_cache;
32
14
    output_stats->num_io_bytes_read_from_remote += _statistics->num_io_bytes_read_from_remote;
33
14
    output_stats->num_io_bytes_read_from_peer += _statistics->num_io_bytes_read_from_peer;
34
14
    return output_stats;
35
14
}
36
37
718k
void FileCacheMetrics::update(FileCacheStatistics* input_stats) {
38
718k
    if (_statistics == nullptr) {
39
1
        std::lock_guard<std::mutex> lock(_mtx);
40
1
        if (_statistics == nullptr) {
41
1
            _statistics = std::make_shared<AtomicStatistics>();
42
1
            register_entity();
43
1
        }
44
1
    }
45
718k
    _statistics->num_io_bytes_read_from_cache += input_stats->bytes_read_from_local;
46
718k
    _statistics->num_io_bytes_read_from_remote += input_stats->bytes_read_from_remote;
47
718k
    _statistics->num_io_bytes_read_from_peer += input_stats->bytes_read_from_peer;
48
718k
}
49
50
1
void FileCacheMetrics::register_entity() {
51
1
    DorisMetrics::instance()->server_entity()->register_hook(
52
1
            "block_file_cache", [this]() { update_metrics_callback(); });
53
1
}
54
55
0
void FileCacheMetrics::update_metrics_callback() {
56
0
    std::shared_ptr<AtomicStatistics> stats = report();
57
0
    DorisMetrics::instance()->num_io_bytes_read_from_cache->set_value(
58
0
            stats->num_io_bytes_read_from_cache);
59
0
    DorisMetrics::instance()->num_io_bytes_read_from_remote->set_value(
60
0
            stats->num_io_bytes_read_from_remote);
61
0
    DorisMetrics::instance()->num_io_bytes_read_from_peer->set_value(
62
0
            stats->num_io_bytes_read_from_peer);
63
0
    DorisMetrics::instance()->num_io_bytes_read_total->set_value(
64
0
            stats->num_io_bytes_read_from_cache + stats->num_io_bytes_read_from_remote +
65
0
            stats->num_io_bytes_read_from_peer);
66
0
}
67
68
FileCacheStatistics diff_file_cache_statistics(const FileCacheStatistics& current,
69
5
                                               const FileCacheStatistics& previous) {
70
5
    FileCacheStatistics diff;
71
215
#define SUBTRACT_FIELD(field) diff.field = current.field - previous.field
72
5
    SUBTRACT_FIELD(num_local_io_total);
73
5
    SUBTRACT_FIELD(num_remote_io_total);
74
5
    SUBTRACT_FIELD(num_peer_io_total);
75
5
    SUBTRACT_FIELD(local_io_timer);
76
5
    SUBTRACT_FIELD(bytes_read_from_local);
77
5
    SUBTRACT_FIELD(bytes_read_from_remote);
78
5
    SUBTRACT_FIELD(bytes_read_from_peer);
79
5
    SUBTRACT_FIELD(remote_io_timer);
80
5
    SUBTRACT_FIELD(peer_io_timer);
81
5
    SUBTRACT_FIELD(remote_wait_timer);
82
5
    SUBTRACT_FIELD(write_cache_io_timer);
83
5
    SUBTRACT_FIELD(bytes_write_into_cache);
84
5
    SUBTRACT_FIELD(num_skip_cache_io_total);
85
5
    SUBTRACT_FIELD(read_cache_file_directly_timer);
86
5
    SUBTRACT_FIELD(cache_get_or_set_timer);
87
5
    SUBTRACT_FIELD(lock_wait_timer);
88
5
    SUBTRACT_FIELD(get_timer);
89
5
    SUBTRACT_FIELD(set_timer);
90
91
5
    SUBTRACT_FIELD(inverted_index_num_local_io_total);
92
5
    SUBTRACT_FIELD(inverted_index_num_remote_io_total);
93
5
    SUBTRACT_FIELD(inverted_index_num_peer_io_total);
94
5
    SUBTRACT_FIELD(inverted_index_bytes_read_from_local);
95
5
    SUBTRACT_FIELD(inverted_index_bytes_read_from_remote);
96
5
    SUBTRACT_FIELD(inverted_index_bytes_read_from_peer);
97
5
    SUBTRACT_FIELD(inverted_index_local_io_timer);
98
5
    SUBTRACT_FIELD(inverted_index_remote_io_timer);
99
5
    SUBTRACT_FIELD(inverted_index_peer_io_timer);
100
5
    SUBTRACT_FIELD(inverted_index_io_timer);
101
5
    SUBTRACT_FIELD(inverted_index_write_cache_io_timer);
102
5
    SUBTRACT_FIELD(inverted_index_bytes_write_into_cache);
103
104
5
    SUBTRACT_FIELD(segment_footer_index_num_local_io_total);
105
5
    SUBTRACT_FIELD(segment_footer_index_num_remote_io_total);
106
5
    SUBTRACT_FIELD(segment_footer_index_num_peer_io_total);
107
5
    SUBTRACT_FIELD(segment_footer_index_bytes_read_from_local);
108
5
    SUBTRACT_FIELD(segment_footer_index_bytes_read_from_remote);
109
5
    SUBTRACT_FIELD(segment_footer_index_bytes_read_from_peer);
110
5
    SUBTRACT_FIELD(segment_footer_index_local_io_timer);
111
5
    SUBTRACT_FIELD(segment_footer_index_remote_io_timer);
112
5
    SUBTRACT_FIELD(segment_footer_index_peer_io_timer);
113
5
    SUBTRACT_FIELD(segment_footer_index_write_cache_io_timer);
114
5
    SUBTRACT_FIELD(segment_footer_index_bytes_write_into_cache);
115
5
    SUBTRACT_FIELD(remote_only_on_miss_triggered);
116
5
    SUBTRACT_FIELD(remote_only_on_miss_threshold_bytes);
117
5
#undef SUBTRACT_FIELD
118
5
    return diff;
119
5
}
120
121
9
FileCacheProfileReporter::FileCacheProfileReporter(RuntimeProfile* profile) : _profile(profile) {
122
9
    static const char* cache_profile = "FileCache";
123
9
    ADD_TIMER_WITH_LEVEL(profile, cache_profile, 2);
124
9
    num_local_io_total =
125
9
            ADD_CHILD_COUNTER_WITH_LEVEL(profile, "NumLocalIOTotal", TUnit::UNIT, cache_profile, 1);
126
9
    num_remote_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "NumRemoteIOTotal", TUnit::UNIT,
127
9
                                                       cache_profile, 1);
128
9
    num_peer_io_total =
129
9
            ADD_CHILD_COUNTER_WITH_LEVEL(profile, "NumPeerIOTotal", TUnit::UNIT, cache_profile, 1);
130
9
    local_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(profile, "LocalIOUseTimer", cache_profile, 1);
131
9
    remote_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(profile, "RemoteIOUseTimer", cache_profile, 1);
132
9
    peer_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(profile, "PeerIOUseTimer", cache_profile, 1);
133
9
    remote_wait_timer =
134
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "WaitOtherDownloaderTimer", cache_profile, 1);
135
9
    write_cache_io_timer =
136
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "WriteCacheIOUseTimer", cache_profile, 1);
137
9
    bytes_write_into_cache = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "BytesWriteIntoCache",
138
9
                                                          TUnit::BYTES, cache_profile, 1);
139
9
    num_skip_cache_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "NumSkipCacheIOTotal",
140
9
                                                           TUnit::UNIT, cache_profile, 1);
141
9
    bytes_scanned_from_cache = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "BytesScannedFromCache",
142
9
                                                            TUnit::BYTES, cache_profile, 1);
143
9
    bytes_scanned_from_remote = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "BytesScannedFromRemote",
144
9
                                                             TUnit::BYTES, cache_profile, 1);
145
9
    bytes_scanned_from_peer = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "BytesScannedFromPeer",
146
9
                                                           TUnit::BYTES, cache_profile, 1);
147
9
    read_cache_file_directly_timer =
148
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "ReadCacheFileDirectlyTimer", cache_profile, 1);
149
9
    cache_get_or_set_timer =
150
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "CacheGetOrSetTimer", cache_profile, 1);
151
9
    lock_wait_timer = ADD_CHILD_TIMER_WITH_LEVEL(profile, "LockWaitTimer", cache_profile, 1);
152
9
    get_timer = ADD_CHILD_TIMER_WITH_LEVEL(profile, "GetTimer", cache_profile, 1);
153
9
    set_timer = ADD_CHILD_TIMER_WITH_LEVEL(profile, "SetTimer", cache_profile, 1);
154
9
    remote_only_on_miss_triggered = profile->AddHighWaterMarkCounter("RemoteOnlyOnMissTriggered",
155
9
                                                                     TUnit::UNIT, cache_profile, 1);
156
9
    remote_only_on_miss_threshold_bytes = profile->AddHighWaterMarkCounter(
157
9
            "RemoteOnlyOnMissThresholdBytes", TUnit::BYTES, cache_profile, 1);
158
159
9
    inverted_index_num_local_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(
160
9
            profile, "InvertedIndexNumLocalIOTotal", TUnit::UNIT, cache_profile, 1);
161
9
    inverted_index_num_remote_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(
162
9
            profile, "InvertedIndexNumRemoteIOTotal", TUnit::UNIT, cache_profile, 1);
163
9
    inverted_index_num_peer_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(
164
9
            profile, "InvertedIndexNumPeerIOTotal", TUnit::UNIT, cache_profile, 1);
165
9
    inverted_index_bytes_scanned_from_cache = ADD_CHILD_COUNTER_WITH_LEVEL(
166
9
            profile, "InvertedIndexBytesScannedFromCache", TUnit::BYTES, cache_profile, 1);
167
9
    inverted_index_bytes_scanned_from_remote = ADD_CHILD_COUNTER_WITH_LEVEL(
168
9
            profile, "InvertedIndexBytesScannedFromRemote", TUnit::BYTES, cache_profile, 1);
169
9
    inverted_index_bytes_scanned_from_peer = ADD_CHILD_COUNTER_WITH_LEVEL(
170
9
            profile, "InvertedIndexBytesScannedFromPeer", TUnit::BYTES, cache_profile, 1);
171
9
    inverted_index_local_io_timer =
172
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "InvertedIndexLocalIOUseTimer", cache_profile, 1);
173
9
    inverted_index_remote_io_timer =
174
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "InvertedIndexRemoteIOUseTimer", cache_profile, 1);
175
9
    inverted_index_peer_io_timer =
176
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "InvertedIndexPeerIOUseTimer", cache_profile, 1);
177
9
    inverted_index_io_timer =
178
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "InvertedIndexIOTimer", cache_profile, 1);
179
9
    inverted_index_write_cache_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(
180
9
            profile, "InvertedIndexWriteCacheIOUseTimer", cache_profile, 1);
181
9
    inverted_index_bytes_write_into_cache = ADD_CHILD_COUNTER_WITH_LEVEL(
182
9
            profile, "InvertedIndexBytesWriteIntoCache", TUnit::BYTES, cache_profile, 1);
183
184
9
    segment_footer_index_num_local_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(
185
9
            profile, "SegmentFooterIndexNumLocalIOTotal", TUnit::UNIT, cache_profile, 1);
186
9
    segment_footer_index_num_remote_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(
187
9
            profile, "SegmentFooterIndexNumRemoteIOTotal", TUnit::UNIT, cache_profile, 1);
188
9
    segment_footer_index_num_peer_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(
189
9
            profile, "SegmentFooterIndexNumPeerIOTotal", TUnit::UNIT, cache_profile, 1);
190
9
    segment_footer_index_bytes_scanned_from_cache = ADD_CHILD_COUNTER_WITH_LEVEL(
191
9
            profile, "SegmentFooterIndexBytesScannedFromCache", TUnit::BYTES, cache_profile, 1);
192
9
    segment_footer_index_bytes_scanned_from_remote = ADD_CHILD_COUNTER_WITH_LEVEL(
193
9
            profile, "SegmentFooterIndexBytesScannedFromRemote", TUnit::BYTES, cache_profile, 1);
194
9
    segment_footer_index_bytes_scanned_from_peer = ADD_CHILD_COUNTER_WITH_LEVEL(
195
9
            profile, "SegmentFooterIndexBytesScannedFromPeer", TUnit::BYTES, cache_profile, 1);
196
9
    segment_footer_index_local_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(
197
9
            profile, "SegmentFooterIndexLocalIOUseTimer", cache_profile, 1);
198
9
    segment_footer_index_remote_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(
199
9
            profile, "SegmentFooterIndexRemoteIOUseTimer", cache_profile, 1);
200
9
    segment_footer_index_peer_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(
201
9
            profile, "SegmentFooterIndexPeerIOUseTimer", cache_profile, 1);
202
9
    segment_footer_index_write_cache_io_timer = ADD_CHILD_TIMER_WITH_LEVEL(
203
9
            profile, "SegmentFooterIndexWriteCacheIOUseTimer", cache_profile, 1);
204
9
    segment_footer_index_bytes_write_into_cache = ADD_CHILD_COUNTER_WITH_LEVEL(
205
9
            profile, "SegmentFooterIndexBytesWriteIntoCache", TUnit::BYTES, cache_profile, 1);
206
207
9
    num_cross_cg_peer_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "CrossCGPeerIOTotal",
208
9
                                                              TUnit::UNIT, cache_profile, 1);
209
9
    bytes_scanned_from_cross_cg_peer = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "CrossCGPeerBytesRead",
210
9
                                                                    TUnit::BYTES, cache_profile, 1);
211
9
    cross_cg_peer_io_timer =
212
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "CrossCGPeerIOTime", cache_profile, 1);
213
9
    num_same_cg_peer_io_total = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "SameCGPeerIOTotal",
214
9
                                                             TUnit::UNIT, cache_profile, 1);
215
9
    bytes_scanned_from_same_cg_peer = ADD_CHILD_COUNTER_WITH_LEVEL(profile, "SameCGPeerBytesRead",
216
9
                                                                   TUnit::BYTES, cache_profile, 1);
217
9
    same_cg_peer_io_timer =
218
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "SameCGPeerIOTime", cache_profile, 1);
219
9
    num_peer_race_peer_win =
220
9
            ADD_CHILD_COUNTER_WITH_LEVEL(profile, "PeerRaceWin", TUnit::UNIT, cache_profile, 1);
221
9
    num_peer_race_s3_win =
222
9
            ADD_CHILD_COUNTER_WITH_LEVEL(profile, "S3RaceWin", TUnit::UNIT, cache_profile, 1);
223
9
    num_peer_lazy_fetch =
224
9
            ADD_CHILD_COUNTER_WITH_LEVEL(profile, "PeerLazyFetch", TUnit::UNIT, cache_profile, 1);
225
9
    peer_lazy_fetch_timer =
226
9
            ADD_CHILD_TIMER_WITH_LEVEL(profile, "PeerLazyFetchTime", cache_profile, 1);
227
9
}
228
229
13
void FileCacheProfileReporter::update(const FileCacheStatistics* statistics) const {
230
13
    COUNTER_UPDATE(num_local_io_total, statistics->num_local_io_total);
231
13
    COUNTER_UPDATE(num_remote_io_total, statistics->num_remote_io_total);
232
13
    COUNTER_UPDATE(num_peer_io_total, statistics->num_peer_io_total);
233
13
    COUNTER_UPDATE(local_io_timer, statistics->local_io_timer);
234
13
    COUNTER_UPDATE(remote_io_timer, statistics->remote_io_timer);
235
13
    COUNTER_UPDATE(peer_io_timer, statistics->peer_io_timer);
236
13
    COUNTER_UPDATE(remote_wait_timer, statistics->remote_wait_timer);
237
13
    COUNTER_UPDATE(write_cache_io_timer, statistics->write_cache_io_timer);
238
13
    COUNTER_UPDATE(bytes_write_into_cache, statistics->bytes_write_into_cache);
239
13
    COUNTER_UPDATE(num_skip_cache_io_total, statistics->num_skip_cache_io_total);
240
13
    COUNTER_UPDATE(bytes_scanned_from_cache, statistics->bytes_read_from_local);
241
13
    COUNTER_UPDATE(bytes_scanned_from_remote, statistics->bytes_read_from_remote);
242
13
    COUNTER_UPDATE(bytes_scanned_from_peer, statistics->bytes_read_from_peer);
243
13
    COUNTER_UPDATE(read_cache_file_directly_timer, statistics->read_cache_file_directly_timer);
244
13
    COUNTER_UPDATE(cache_get_or_set_timer, statistics->cache_get_or_set_timer);
245
13
    COUNTER_UPDATE(lock_wait_timer, statistics->lock_wait_timer);
246
13
    COUNTER_UPDATE(get_timer, statistics->get_timer);
247
13
    COUNTER_UPDATE(set_timer, statistics->set_timer);
248
13
    remote_only_on_miss_triggered->set(statistics->remote_only_on_miss_triggered);
249
13
    remote_only_on_miss_threshold_bytes->set(statistics->remote_only_on_miss_threshold_bytes);
250
251
13
    COUNTER_UPDATE(inverted_index_num_local_io_total,
252
13
                   statistics->inverted_index_num_local_io_total);
253
13
    COUNTER_UPDATE(inverted_index_num_remote_io_total,
254
13
                   statistics->inverted_index_num_remote_io_total);
255
13
    COUNTER_UPDATE(inverted_index_num_peer_io_total, statistics->inverted_index_num_peer_io_total);
256
13
    COUNTER_UPDATE(inverted_index_bytes_scanned_from_cache,
257
13
                   statistics->inverted_index_bytes_read_from_local);
258
13
    COUNTER_UPDATE(inverted_index_bytes_scanned_from_remote,
259
13
                   statistics->inverted_index_bytes_read_from_remote);
260
13
    COUNTER_UPDATE(inverted_index_bytes_scanned_from_peer,
261
13
                   statistics->inverted_index_bytes_read_from_peer);
262
13
    COUNTER_UPDATE(inverted_index_local_io_timer, statistics->inverted_index_local_io_timer);
263
13
    COUNTER_UPDATE(inverted_index_remote_io_timer, statistics->inverted_index_remote_io_timer);
264
13
    COUNTER_UPDATE(inverted_index_peer_io_timer, statistics->inverted_index_peer_io_timer);
265
13
    COUNTER_UPDATE(inverted_index_io_timer, statistics->inverted_index_io_timer);
266
13
    COUNTER_UPDATE(inverted_index_write_cache_io_timer,
267
13
                   statistics->inverted_index_write_cache_io_timer);
268
13
    COUNTER_UPDATE(inverted_index_bytes_write_into_cache,
269
13
                   statistics->inverted_index_bytes_write_into_cache);
270
271
13
    COUNTER_UPDATE(segment_footer_index_num_local_io_total,
272
13
                   statistics->segment_footer_index_num_local_io_total);
273
13
    COUNTER_UPDATE(segment_footer_index_num_remote_io_total,
274
13
                   statistics->segment_footer_index_num_remote_io_total);
275
13
    COUNTER_UPDATE(segment_footer_index_num_peer_io_total,
276
13
                   statistics->segment_footer_index_num_peer_io_total);
277
13
    COUNTER_UPDATE(segment_footer_index_bytes_scanned_from_cache,
278
13
                   statistics->segment_footer_index_bytes_read_from_local);
279
13
    COUNTER_UPDATE(segment_footer_index_bytes_scanned_from_remote,
280
13
                   statistics->segment_footer_index_bytes_read_from_remote);
281
13
    COUNTER_UPDATE(segment_footer_index_bytes_scanned_from_peer,
282
13
                   statistics->segment_footer_index_bytes_read_from_peer);
283
13
    COUNTER_UPDATE(segment_footer_index_local_io_timer,
284
13
                   statistics->segment_footer_index_local_io_timer);
285
13
    COUNTER_UPDATE(segment_footer_index_remote_io_timer,
286
13
                   statistics->segment_footer_index_remote_io_timer);
287
13
    COUNTER_UPDATE(segment_footer_index_peer_io_timer,
288
13
                   statistics->segment_footer_index_peer_io_timer);
289
13
    COUNTER_UPDATE(segment_footer_index_write_cache_io_timer,
290
13
                   statistics->segment_footer_index_write_cache_io_timer);
291
13
    COUNTER_UPDATE(segment_footer_index_bytes_write_into_cache,
292
13
                   statistics->segment_footer_index_bytes_write_into_cache);
293
294
13
    COUNTER_UPDATE(num_cross_cg_peer_io_total, statistics->num_cross_cg_peer_io_total);
295
13
    COUNTER_UPDATE(bytes_scanned_from_cross_cg_peer, statistics->bytes_read_from_cross_cg_peer);
296
13
    COUNTER_UPDATE(cross_cg_peer_io_timer, statistics->cross_cg_peer_io_timer);
297
13
    COUNTER_UPDATE(num_same_cg_peer_io_total, statistics->num_same_cg_peer_io_total);
298
13
    COUNTER_UPDATE(bytes_scanned_from_same_cg_peer, statistics->bytes_read_from_same_cg_peer);
299
13
    COUNTER_UPDATE(same_cg_peer_io_timer, statistics->same_cg_peer_io_timer);
300
13
    COUNTER_UPDATE(num_peer_race_peer_win, statistics->num_peer_race_peer_win);
301
13
    COUNTER_UPDATE(num_peer_race_s3_win, statistics->num_peer_race_s3_win);
302
13
    COUNTER_UPDATE(num_peer_lazy_fetch, statistics->num_peer_lazy_fetch);
303
13
    COUNTER_UPDATE(peer_lazy_fetch_timer, statistics->peer_lazy_fetch_timer);
304
305
13
    if (!statistics->peer_hosts.empty() && _profile != nullptr) {
306
0
        std::string peer_nodes;
307
0
        for (const auto& host : statistics->peer_hosts) {
308
0
            if (!peer_nodes.empty()) {
309
0
                peer_nodes += ", ";
310
0
            }
311
0
            peer_nodes += host;
312
0
        }
313
0
        _profile->add_info_string("PeerCacheNodes", peer_nodes);
314
0
    }
315
13
}
316
317
} // namespace doris::io