diff --git a/ydb/library/workload/log/log.cpp b/ydb/library/workload/log/log.cpp index 4f6c214972fe..f2c540a68291 100644 --- a/ydb/library/workload/log/log.cpp +++ b/ydb/library/workload/log/log.cpp @@ -1,17 +1,9 @@ #include "log.h" #include +#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - namespace NYdbWorkload { namespace NLog { @@ -22,8 +14,6 @@ using TRow = TLogGenerator::TRow; TLogGenerator::TLogGenerator(const TLogWorkloadParams* params) : TBase(params) , TotalColumnsCnt(1 + Params.IntColumnsCnt + Params.StrColumnsCnt) - , RandomDevice() - , Mt19937(RandomDevice()) { Y_ABORT_UNLESS(TotalColumnsCnt >= Params.KeyColumnsCnt); } @@ -209,10 +199,9 @@ TVector TLogGenerator::GetCleanPaths() const { TVector TLogGenerator::GenerateRandomRows() { TVector result(Params.RowsCnt); - std::normal_distribution normal_distribution_generator(0, static_cast(Params.TimestampStandardDeviationMinutes)); for (size_t row = 0; row < Params.RowsCnt; ++row) { result[row].Ts = TInstant::Now(); - i64 millisecondsDiff = 60*1000*normal_distribution_generator(Mt19937); + i64 millisecondsDiff = 60 * 1000 * NormalRandom(0., static_cast(Params.TimestampStandardDeviationMinutes)); if (millisecondsDiff >= 0) { // TDuration::MilliSeconds can't be negative for some reason... result[row].Ts = result[row].Ts + TDuration::MilliSeconds(millisecondsDiff); } else { diff --git a/ydb/library/workload/log/log.h b/ydb/library/workload/log/log.h index 04851a2cc797..7dd8cc3101f6 100644 --- a/ydb/library/workload/log/log.h +++ b/ydb/library/workload/log/log.h @@ -3,8 +3,6 @@ #include #include -#include -#include namespace NYdbWorkload { @@ -102,9 +100,6 @@ class TLogGenerator final: public TWorkloadQueryGeneratorBase GenerateRandomRows(); const ui64 TotalColumnsCnt; - - std::random_device RandomDevice; - std::mt19937 Mt19937; }; } // namespace NLog