aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordakovalkov <dakovalkov@yandex-team.com>2024-06-24 13:01:05 +0300
committerdakovalkov <dakovalkov@yandex-team.com>2024-06-24 13:17:40 +0300
commit726df91bbe09ee8ef71a2ad8c3cef36e97c6a281 (patch)
tree5c82ae425ba2bdb8778b732782f73935a8c0d6c5
parent822f05366f99c6075b8a029679632c0a6c08418c (diff)
downloadydb-726df91bbe09ee8ef71a2ad8c3cef36e97c6a281.tar.gz
Enrich system log tables
af12d8b1948618e95ac1fded02b1f3c9317ac9b6
-rw-r--r--yt/yt/client/table_client/unversioned_row.h7
-rw-r--r--yt/yt/core/profiling/timing.cpp5
-rw-r--r--yt/yt/core/profiling/timing.h5
3 files changed, 15 insertions, 2 deletions
diff --git a/yt/yt/client/table_client/unversioned_row.h b/yt/yt/client/table_client/unversioned_row.h
index f5ab878d3f..02b242ce52 100644
--- a/yt/yt/client/table_client/unversioned_row.h
+++ b/yt/yt/client/table_client/unversioned_row.h
@@ -656,6 +656,13 @@ public:
GetHeader()->Count = count;
}
+ void PushBack(TUnversionedValue value)
+ {
+ ui32 count = GetCount();
+ SetCount(count + 1);
+ Begin()[count] = value;
+ }
+
TUnversionedValue& operator[] (ui32 index)
{
YT_ASSERT(index < GetHeader()->Count);
diff --git a/yt/yt/core/profiling/timing.cpp b/yt/yt/core/profiling/timing.cpp
index e7829c2d44..f46f498d8f 100644
--- a/yt/yt/core/profiling/timing.cpp
+++ b/yt/yt/core/profiling/timing.cpp
@@ -53,6 +53,11 @@ TDuration TWallTimer::GetElapsedTime() const
return CpuDurationToDuration(GetElapsedCpuTime());
}
+TDuration TWallTimer::GetCurrentDuration() const
+{
+ return CpuDurationToDuration(GetCurrentCpuDuration());
+}
+
TCpuInstant TWallTimer::GetStartCpuTime() const
{
return StartTime_;
diff --git a/yt/yt/core/profiling/timing.h b/yt/yt/core/profiling/timing.h
index f93ea2f2c0..f2fa591601 100644
--- a/yt/yt/core/profiling/timing.h
+++ b/yt/yt/core/profiling/timing.h
@@ -45,9 +45,12 @@ public:
TInstant GetStartTime() const;
TDuration GetElapsedTime() const;
TValue GetElapsedValue() const;
+ //! Returns the time that has elapsed since the last call to Start().
+ TDuration GetCurrentDuration() const;
TCpuInstant GetStartCpuTime() const;
TCpuDuration GetElapsedCpuTime() const;
+ TCpuDuration GetCurrentCpuDuration() const;
void Start();
void StartIfNotActive();
@@ -57,8 +60,6 @@ public:
void Persist(const TStreamPersistenceContext& context);
private:
- TCpuDuration GetCurrentCpuDuration() const;
-
TCpuInstant StartTime_ = 0;
TCpuDuration Duration_ = 0;
bool Active_ = false;