public DynamicJsonValue ToSqlReplicationMetricsData()
 {
     return(new DynamicJsonValue
     {
         ["GeneralMetrics"] = new DynamicJsonValue
         {
             ["Batch Size Meter"] = SqlReplicationBatchSizeMeter.CreateMeterData()
         },
         ["TablesMetrics"] = TablesMetrics.ToDictionary(x => x.Key, x => x.Value.ToSqlReplicationTableMetricsDataDictionary()),
     });
 }
 public SqlReplicationMetricsData ToSqlReplicationMetricsData()
 {
     return new SqlReplicationMetricsData()
     {
         GeneralMetrics = new Dictionary<string, IMetricsData>()
         {
             {"Batch Size Meter", SqlReplicationBatchSizeMeter.CreateMeterData()},
             {"Batch Size Histogram", SqlReplicationBatchSizeHistogram.CreateHistogramData()},
             {"Duration Histogram", SqlReplicationDurationHistogram.CreateHistogramData()}
         },
         TablesMetrics = TablesMetrics.ToDictionary(x => x.Key, x => x.Value.ToSqlReplicationTableMetricsDataDictionary())
     };
 }