// Copyright Epic Games, Inc. All Rights Reserved.
using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.Logging;
namespace EpicGames.Horde.Jobs.Timing
{
///
/// Timing information for a particular job
///
public interface IJobTiming
{
///
/// Gets timing information for a particular step
///
/// Name of the node being executed
/// Logger for diagnostic messages
/// Receives the timing information for the given step
/// True if the timing was found
public bool TryGetStepTiming(string name, ILogger logger, [NotNullWhen(true)] out IJobStepTiming? timing);
}
///
/// Information about the timing for an individual step
///
public interface IJobStepTiming
{
///
/// Wait time before executing the group containing this node
///
public float? AverageWaitTime { get; }
///
/// Time taken for the group containing this node to initialize
///
public float? AverageInitTime { get; }
///
/// Time spent executing this node
///
public float? AverageDuration { get; }
}
}