コード例 #1
0
 public GaugeSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output         = output;
     _serializer     = new MetricDataSerializer();
     _gauge          = fixture.Gauges.First(x => x.Name == fixture.GaugeNameDefault);
     _gaugeWithGroup = fixture.Gauges.First(x => x.Name == fixture.GaugeNameWithGroup);
 }
コード例 #2
0
 public HistogramSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output             = output;
     _serializer         = new MetricDataSerializer();
     _histogram          = fixture.Histograms.First(x => x.Name == fixture.HistogramNameDefault);
     _histogramWithGroup = fixture.Histograms.First(x => x.Name == fixture.HistogramNameWithGroup);
 }
コード例 #3
0
 public MeterSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output         = output;
     _serializer     = new MetricDataSerializer();
     _meter          = fixture.Meters.First(x => x.Name == fixture.MeterNameDefault);
     _meterWithGroup = fixture.Meters.First(x => x.Name == fixture.MeterNameWithGroup);
 }
コード例 #4
0
        public CounterSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
        {
            _output     = output;
            _serializer = new MetricDataSerializer();
            _counter    = fixture.Counters.First();

            _counter = fixture.Counters.First(x => x.Name == fixture.CounterNameDefault);
        }
コード例 #5
0
        public ApdexSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
        {
            _output     = output;
            _serializer = new MetricDataSerializer();
            _apdex      = fixture.ApdexScores.First();

            _apdex = fixture.ApdexScores.First(x => x.Name == fixture.ApdexNameDefault);
        }
コード例 #6
0
        public MetricsHostTestFixture()
        {
            var builder = new WebHostBuilder().UseStartup <TStartup>();

            _server = new TestServer(builder);

            Client  = _server.CreateClient();
            Context = _server.Host.Services.GetRequiredService <IMetrics>();
            JsonMetricsSerializer = new MetricDataSerializer();
        }
コード例 #7
0
 public TimerSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output     = output;
     _serializer = new MetricDataSerializer();
     _timer      = fixture.Timers.First();
 }
コード例 #8
0
 public HistogramSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output     = output;
     _serializer = new MetricDataSerializer();
     _histogram  = fixture.Histograms.First();
 }
コード例 #9
0
 public GaugeSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output     = output;
     _serializer = new MetricDataSerializer();
     _gauge      = fixture.Gauges.First();
 }
コード例 #10
0
 public MetricsDataSerializationTests(ITestOutputHelper output, MetricProviderTestFixture fixture)
 {
     _output     = output;
     _serializer = new MetricDataSerializer();
     _metrics    = fixture.DataWithOneContext;
 }