コード例 #1
0
        /// <summary>
        /// Creates perf info given a specific pip status (it is mapped to a <see cref="PipExecutionLevel"/>),
        /// and with start-stop markers at the current instant (zero duration).
        /// </summary>
        public static PipExecutionPerformance CreatePoint(PipResultStatus status)
        {
            DateTime point = DateTime.UtcNow;

            return(new PipExecutionPerformance(status.ToExecutionLevel(), point, point, workerId: 0));
        }
コード例 #2
0
        /// <summary>
        /// Creates perf info given a specific pip status (it is mapped to a <see cref="PipExecutionLevel"/>) and a start time
        /// (the end time is inferred as the current time).
        /// </summary>
        public static PipExecutionPerformance Create(PipResultStatus status, DateTime executionStart)
        {
            Contract.Requires(executionStart.Kind == DateTimeKind.Utc);

            return(new PipExecutionPerformance(status.ToExecutionLevel(), executionStart, DateTime.UtcNow, workerId: 0));
        }