/// <summary> /// Observer of IDriverMetrics. /// When Driver metrics data is changed, this method will be called. /// It calls Sink to store/log the metrics data. /// </summary> /// <param name="driverMetrics">driver metrics data.</param> public void OnNext(IDriverMetrics driverMetrics) { Sink(new Dictionary <string, string>() { { "SystemState", driverMetrics.SystemState }, { "TimeUpdated", driverMetrics.TimeUpdated.ToLongTimeString() } }); }
public void OnNext(IDriverStarted value) { _driverMetrics = new DriverMetrics(); UpdateMetrics(TestSystemState.DriverStarted); var request = _evaluatorRequestor.NewBuilder() .SetNumber(1) .SetMegabytes(512) .SetCores(2) .SetRackName("WonderlandRack") .SetEvaluatorBatchId("MetricsEvaluator") .Build(); _evaluatorRequestor.Submit(request); }
/// <summary> /// Utility method that wraps a call to <see cref="IDriverMetrics.GetSessionMetric{TMetricType}"/> with the appropriate AppMetrics based counter type /// as the type parameter. For more information see the API docs of <see cref="IDriverMetrics.GetSessionMetric{TMetricType}"/>. /// </summary> public static IAppMetricsCounter GetSessionCounter(this IDriverMetrics driverMetrics, SessionMetric sessionMetric) { MetricsExtensions.ThrowIfNull(driverMetrics, sessionMetric); return(driverMetrics.GetSessionMetric <IAppMetricsCounter>(sessionMetric)); }
/// <summary> /// Utility method that wraps a call to <see cref="IDriverMetrics.GetNodeMetric{TMetricType}"/> with the appropriate AppMetrics based timer type /// as the type parameter. For more information see the API docs of <see cref="IDriverMetrics.GetNodeMetric{TMetricType}"/>. /// </summary> public static IAppMetricsTimer GetNodeTimer(this IDriverMetrics driverMetrics, Host host, NodeMetric nodeMetric) { MetricsExtensions.ThrowIfNull(driverMetrics, host, nodeMetric); return(driverMetrics.GetNodeMetric <IAppMetricsTimer>(host, nodeMetric)); }
private static void ThrowIfNull(IDriverMetrics driverMetrics, Host host, NodeMetric nodeMetric) { MetricsExtensions.ThrowIfNull(driverMetrics, nameof(driverMetrics)); MetricsExtensions.ThrowIfNull(host, nameof(host)); MetricsExtensions.ThrowIfNull(nodeMetric, nameof(nodeMetric)); }
private static void ThrowIfNull(IDriverMetrics driverMetrics, SessionMetric sessionMetric) { MetricsExtensions.ThrowIfNull(driverMetrics, nameof(driverMetrics)); MetricsExtensions.ThrowIfNull(sessionMetric, nameof(sessionMetric)); }
/// <summary> /// Utility method that wraps a call to <see cref="IDriverMetrics.GetSessionMetric{TMetricType}"/> with the appropriate AppMetrics based gauge type /// as the type parameter. For more information see the API docs of <see cref="IDriverMetrics.GetSessionMetric{TMetricType}"/>. /// </summary> public static IAppMetricsGauge GetSessionGauge(this IDriverMetrics driverMetrics, SessionMetric sessionMetric) { MetricsExtensions.ThrowIfNull(driverMetrics, sessionMetric); return(driverMetrics.GetSessionMetric <IAppMetricsGauge>(sessionMetric)); }
/// <summary> /// Observer of IDriverMetrics. /// Called when Driver metrics data is changed. /// </summary> /// <param name="driverMetrics">driver metrics data.</param> public void OnNext(IDriverMetrics driverMetrics) { Sink(driverMetrics.GetMetricsData().FlushMetricRecords()); }