Exemplo n.º 1
0
        public void TestClientInstrumentMetricsReportingStmtGroups()
        {
            RegressionSession session = RegressionRunner.Session();
            session.Configuration.Compiler.ByteCode.AllowSubscriber = true;

            ApplyMetricsConfig(session.Configuration, -1, 7000);

            ConfigurationRuntimeMetricsReporting.StmtGroupMetrics groupOne = new ConfigurationRuntimeMetricsReporting.StmtGroupMetrics();
            groupOne.Interval = 8000;
            groupOne.AddIncludeLike("%GroupOne%");
            groupOne.IsReportInactive = true;
            session.Configuration.Runtime.MetricsReporting.AddStmtGroup("GroupOneStatements", groupOne);

            ConfigurationRuntimeMetricsReporting.StmtGroupMetrics groupTwo = new ConfigurationRuntimeMetricsReporting.StmtGroupMetrics();
            groupTwo.Interval = 6000;
            groupTwo.IsDefaultInclude = true;
            groupTwo.AddExcludeLike("%Default%");
            groupTwo.AddExcludeLike("%Metrics%");
            session.Configuration.Runtime.MetricsReporting.AddStmtGroup("GroupTwoNonDefaultStatements", groupTwo);

            ConfigurationRuntimeMetricsReporting.StmtGroupMetrics groupThree = new ConfigurationRuntimeMetricsReporting.StmtGroupMetrics();
            groupThree.Interval = -1;
            groupThree.AddIncludeLike("%Metrics%");
            session.Configuration.Runtime.MetricsReporting.AddStmtGroup("MetricsStatements", groupThree);

            RegressionRunner.Run(session, new ClientInstrumentMetricsReportingStmtGroups());

            session.Dispose();
        }
Exemplo n.º 2
0
 public void TestClientInstrumentMetricsReportingDisableStatement()
 {
     RegressionSession session = RegressionRunner.Session();
     ApplyMetricsConfig(session.Configuration, -1, 10000);
     ConfigurationRuntimeMetricsReporting.StmtGroupMetrics configOne = new ConfigurationRuntimeMetricsReporting.StmtGroupMetrics();
     configOne.Interval = -1;
     configOne.AddIncludeLike("%@METRIC%");
     session.Configuration.Runtime.MetricsReporting.AddStmtGroup("metrics", configOne);
     RegressionRunner.Run(session, new ClientInstrumentMetricsReportingDisableStatement());
     session.Dispose();
 }
Exemplo n.º 3
0
        public void TestClientInstrumentMetricsReportingStmtMetrics()
        {
            RegressionSession session = RegressionRunner.Session();

            ApplyMetricsConfig(session.Configuration, -1, -1);

            ConfigurationRuntimeMetricsReporting.StmtGroupMetrics configOne = new ConfigurationRuntimeMetricsReporting.StmtGroupMetrics();
            configOne.Interval = 10000;
            configOne.AddIncludeLike("%cpuStmt%");
            configOne.AddIncludeLike("%wallStmt%");
            session.Configuration.Runtime.MetricsReporting.AddStmtGroup("nonmetrics", configOne);

            // exclude metrics themselves from reporting
            ConfigurationRuntimeMetricsReporting.StmtGroupMetrics configTwo = new ConfigurationRuntimeMetricsReporting.StmtGroupMetrics();
            configTwo.Interval = -1;
            configOne.AddExcludeLike("%metrics%");
            session.Configuration.Runtime.MetricsReporting.AddStmtGroup("metrics", configTwo);

            RegressionRunner.Run(session, new ClientInstrumentMetricsReportingStmtMetrics());

            session.Dispose();
        }