Class representing a collection of job statistics.
More...
#include <job_statistics.h>
|
|
| TJobStatistics () |
| | Construct empty statistics.
|
|
| TJobStatistics (const NYT::TNode &statistics) |
| | Construct statistics from statistics node.
|
|
| TJobStatistics (const TJobStatistics &jobStatistics) |
|
| TJobStatistics (TJobStatistics &&jobStatistics) noexcept |
|
TJobStatistics & | operator= (const TJobStatistics &jobStatistics) |
|
TJobStatistics & | operator= (TJobStatistics &&jobStatistics) noexcept |
| TJobStatistics | TaskName (TVector< TTaskName > taskNames) const |
| | Filter statistics by task name.
|
| TJobStatistics | JobState (TVector< EJobState > filter) const |
| | Filter statistics by job state.
|
| TJobStatistics | JobType (TVector< EJobType > filter) const |
| | Filter statistics by job type.
|
| bool | HasStatistics (TStringBuf name) const |
| | Check that given statistics exist.
|
| TJobStatisticsEntry< i64 > | GetStatistics (TStringBuf name) const |
| | Get statistics by name.
|
| template<typename T> |
| TJobStatisticsEntry< T > | GetStatisticsAs (TStringBuf name) const |
| | Get statistics by name.
|
|
TVector< TString > | GetStatisticsNames () const |
| | Get (slash separated) names of statistics.
|
| bool | HasCustomStatistics (TStringBuf name) const |
| | Check if given custom statistics exists.
|
| TJobStatisticsEntry< i64 > | GetCustomStatistics (TStringBuf name) const |
| | Get custom statistics (those the user can write in job with NYT::WriteCustomStatistics).
|
| template<typename T> |
| TJobStatisticsEntry< T > | GetCustomStatisticsAs (TStringBuf name) const |
| | Get custom statistics (those the user can write in job with NYT::WriteCustomStatistics).
|
|
TVector< TString > | GetCustomStatisticsNames () const |
| | Get names of all custom statistics.
|
|
|
template<typename T> |
| class | TJobStatisticsEntry |
Class representing a collection of job statistics.
◆ GetCustomStatistics()
| TJobStatisticsEntry< i64 > NYT::TJobStatistics::GetCustomStatistics |
( |
TStringBuf | name | ) |
const |
Get custom statistics (those the user can write in job with NYT::WriteCustomStatistics).
- Parameters
-
| name | Slash separated custom statistics name. |
◆ GetCustomStatisticsAs()
template<typename T>
| TJobStatisticsEntry< T > NYT::TJobStatistics::GetCustomStatisticsAs |
( |
TStringBuf | name | ) |
const |
Get custom statistics (those the user can write in job with NYT::WriteCustomStatistics).
- Parameters
-
| name | Slash separated custom statistics name. |
◆ GetStatistics()
| TJobStatisticsEntry< i64 > NYT::TJobStatistics::GetStatistics |
( |
TStringBuf | name | ) |
const |
Get statistics by name.
- Parameters
-
| name | Slash separated statistics name, e.g. "time/total" (like it appears in web interface). |
- Note
- If statistics is missing an exception is thrown. If because of filters no fields remain the returned value is empty (all fields are Nothing).
-
We don't use TMaybe<TJobStatisticsEntry> here; instead, NYT::TJobStatisticsEntry methods return TMaybe<i64>, so user easier use .GetOrElse:
jobStatistics.GetStatistics("some/statistics/name").Max().GetOrElse(0);
◆ GetStatisticsAs()
template<typename T>
| TJobStatisticsEntry< T > NYT::TJobStatistics::GetStatisticsAs |
( |
TStringBuf | name | ) |
const |
Get statistics by name.
- Parameters
-
| name | Slash separated statistics name, e.g. "time/total" (like it appears in web interface). |
- Note
- In order to use GetStatisticsAs method, NYT::ConvertJobStatisticsEntry function must be defined (the library defines it for i64 and TDuration, user may define it for other types).
◆ HasCustomStatistics()
| bool NYT::TJobStatistics::HasCustomStatistics |
( |
TStringBuf | name | ) |
const |
Check if given custom statistics exists.
- Parameters
-
| name | Slash separated custom statistics name. |
◆ HasStatistics()
| bool NYT::TJobStatistics::HasStatistics |
( |
TStringBuf | name | ) |
const |
Check that given statistics exist.
- Parameters
-
| name | Slash separated statistics name, e.g. "time/total" (like it appears in web interface). |
◆ JobState()
Filter statistics by job state.
- Parameters
-
| filter | What job states to include (empty means all). |
- Note
- Default statistics include only (successfully) completed jobs.
◆ JobType()
◆ TaskName()
Filter statistics by task name.
- Parameters
-
| taskNames | What task names to include (empty means all). |
The documentation for this class was generated from the following file: