< Summary - pva.SuperV

Information
Class: pva.SuperV.Engine.HistoryRetrieval.HistoryStatisticRow
Assembly: pva.SuperV.Engine
File(s): /home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Engine/HistoryRetrieval/HistoryStatisticRow.cs
Tag: dotnet-ubuntu_18869653307
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 30
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_StartTime()100%11100%
get_EndTime()100%11100%
get_Duration()100%11100%

File(s)

/home/runner/work/pva.SuperV/pva.SuperV/pva.SuperV.Engine/HistoryRetrieval/HistoryStatisticRow.cs

#LineLine coverage
 1using TDengine.Driver;
 2
 3namespace pva.SuperV.Engine.HistoryRetrieval
 4{
 5    /// <summary>
 6    /// Row of history for a specific timestamp.
 7    /// </summary>
 8    /// <remarks>
 9    /// Builds a row from a TDengine row.
 10    /// </remarks>
 11    /// <param name="row">TDengine row</param>
 12    public class HistoryStatisticRow(IRows row, List<HistoryStatisticField> fields)
 2113        : HistoryRow(row, [.. fields.Select(field => field.Field)], false)
 14    {
 15        /// <summary>
 16        /// Start time of interval if an interval was specified.
 17        /// </summary>
 1218        public DateTime StartTime { get; } = ((DateTime)row.GetValue(row.FieldCount - 5)).ToUniversalTime();
 19
 20        /// <summary>
 21        /// End time of interval if an interval was specified.
 22        /// </summary>
 1223        public DateTime EndTime { get; } = ((DateTime)row.GetValue(row.FieldCount - 4)).ToUniversalTime();
 24
 25        /// <summary>
 26        /// Duration of interval if an interval was specified.
 27        /// </summary>
 1228        public TimeSpan Duration { get; } = TimeSpan.FromMicroseconds(((long)row.GetValue(row.FieldCount - 3)) / 1000);
 29    }
 30}