public Task SuppressEmptySamples()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         var counter = factory.CreateCounter("test", "with help text", "category");
         counter.WithLabels("some").Inc(5.5);
     }, $"{_resourcesNamespace}.CounterTests_SuppressEmpty.txt"));
 }
 public Task SuppressEmptySamples()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         var gauge = factory.CreateGaugeInt64("test", "with help text", "category");
         gauge.WithLabels("some").Inc(5);
     }, $"{_resourcesNamespace}.GaugeTests_SuppressEmpty.txt"));
 }
        public Task Collection()
        {
            return(CollectionTestHelper.TestCollectionAsync(factory => {
                var gauge = factory.CreateGaugeInt64("test", "with help text", "category");
                gauge.Inc();
                gauge.WithLabels("some").Inc(5);

                var gauge2 = factory.CreateGaugeInt64("nextgauge", "with help text", "group", "type");
                gauge2.Inc();
                gauge2.WithLabels("any", "2").Dec(5);
            }, $"{_resourcesNamespace}.GaugeTests_Collection.txt"));
        }
Beispiel #4
0
        public Task Collection()
        {
            return(CollectionTestHelper.TestCollectionAsync(factory => {
                var untyped = factory.CreateUntyped("test", "with help text", "category");
                untyped.Set(1);
                untyped.WithLabels("some").Set(double.NaN);

                var untyped2 = factory.CreateUntyped("nextuntyped", "with help text", "group", "type");
                untyped2.Set(10);
                untyped2.WithLabels("any", "2").Set(5);
            }, $"{_resourcesNamespace}.UntypedTests_Collection.txt"));
        }
        public Task Collection()
        {
            return(CollectionTestHelper.TestCollectionAsync(factory => {
                var histogram = factory.CreateHistogram("hist1", "help", new[] { 1.0, 2.0, 3.0 });
                histogram.Observe(1.5);
                histogram.Observe(2.5);
                histogram.Observe(1);
                histogram.Observe(2.4);
                histogram.Observe(2.1);
                histogram.Observe(0.4);
                histogram.Observe(1.4);
                histogram.Observe(1.5);
                histogram.Observe(3.9);

                var histogram2 = factory.CreateHistogram("hist2", "help2", new[] { -5.0, 0, 5.0, 10 });
                histogram2.Observe(-20);
                histogram2.Observe(-1);
                histogram2.Observe(0);
                histogram2.Observe(2.5);
                histogram2.Observe(5);
                histogram2.Observe(9);
                histogram2.Observe(11);
            }, $"{_resourcesNamespace}.HistogramTests_Collection.txt"));
        }
 public Task EmptyCollection()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         factory.CreateCounter("test", "with help text", MetricFlags.None);
     }, $"{_resourcesNamespace}.CounterTests_Empty.txt"));
 }
 public Task EmptyCollection()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         factory.CreateGaugeInt64("test", "with help text");
     }, $"{_resourcesNamespace}.GaugeTests_Empty.txt"));
 }
 public Task SuppressEmptySamples()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         factory.CreateHistogram("hist1", "help", new[] { -5.0, 0, 5.0, 10 }, "type");
     }, $"{_resourcesNamespace}.HistogramTests_SuppressEmpty.txt"));
 }
 public Task EmptyCollection()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         factory.CreateHistogram("hist1", "help", false, false, new[] { 1.0, 2.0, 3.0 });
     }, $"{_resourcesNamespace}.HistogramTests_Empty.txt"));
 }
Beispiel #10
0
 public Task EmptyCollection()
 {
     return(CollectionTestHelper.TestCollectionAsync(factory => {
         factory.CreateUntyped("test", "with help text", false, false, "category");
     }, $"{_resourcesNamespace}.UntypedTests_Empty.txt"));
 }