aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/stockpile/stockpile.h
blob: 1df9591de40e83075734f86ae190ea55b76ef9c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#pragma once

#include <util/system/types.h>

#include <util/generic/size_literals.h>

#include <util/datetime/base.h>

namespace NYT {

////////////////////////////////////////////////////////////////////////////////

struct TStockpileOptions
{
    static constexpr i64 DefaultBufferSize = 4_GBs;
    i64 BufferSize = DefaultBufferSize;

    static constexpr int DefaultThreadCount = 4;
    int ThreadCount = DefaultThreadCount;

    static constexpr TDuration DefaultPeriod = TDuration::MilliSeconds(10);
    TDuration Period = DefaultPeriod;
};

void ConfigureStockpile(const TStockpileOptions& options);

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT