public void MultiStatistics_Exec_SourceInstance()
        {
            var counters = new List <Counter>
            {
                new Counter("MyService1.MyCommand1.exec_time", CounterType.Statistics)
                {
                    Min     = 1,
                    Max     = 3,
                    Average = 2,
                    Count   = 2,
                    Last    = 3,
                    Time    = DateTime.MinValue
                },
                new Counter("MyService2.MyCommand2.exec_time", CounterType.Statistics)
                {
                    Min     = 2,
                    Max     = 4,
                    Average = 3,
                    Count   = 5,
                    Last    = 10,
                    Time    = DateTime.MinValue
                }
            };
            var body = PrometheusCounterConverter.ToString(counters, "MyApp", "MyInstance");

            const string expected =
                "# TYPE exec_time_max gauge\nexec_time_max{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService1\",command=\"MyCommand1\"} 3\n"
                + "# TYPE exec_time_min gauge\nexec_time_min{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService1\",command=\"MyCommand1\"} 1\n"
                + "# TYPE exec_time_average gauge\nexec_time_average{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService1\",command=\"MyCommand1\"} 2\n"
                + "# TYPE exec_time_count gauge\nexec_time_count{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService1\",command=\"MyCommand1\"} 2\n"
                + "# TYPE exec_time_max gauge\nexec_time_max{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService2\",command=\"MyCommand2\"} 4\n"
                + "# TYPE exec_time_min gauge\nexec_time_min{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService2\",command=\"MyCommand2\"} 2\n"
                + "# TYPE exec_time_average gauge\nexec_time_average{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService2\",command=\"MyCommand2\"} 3\n"
                + "# TYPE exec_time_count gauge\nexec_time_count{source=\"MyApp\",instance=\"MyInstance\",service=\"MyService2\",command=\"MyCommand2\"} 5\n";

            Assert.Equal(expected, body);
        }
        public void NullValues()
        {
            var body = PrometheusCounterConverter.ToString(null, null, null);

            Assert.Equal(string.Empty, body);
        }