Exemplo n.º 1
0
        public static void SetCommitPollingClientBufferSize(String pollerName, Func <double> valueProvider)
        {
            String gaugeName;

            if (!String.IsNullOrEmpty(pollerName))
            {
                gaugeName = _commitPollingClientBufferSizeGaugeName + "-" + pollerName;
            }
            else
            {
                gaugeName = _commitPollingClientBufferSizeGaugeName;
            }
            if (TenantContext.CurrentTenantId != null)
            {
                gaugeName = "t[" + TenantContext.CurrentTenantId + "]" + gaugeName;
            }
            MetricsHelper.CreateGauge(gaugeName, valueProvider, Unit.Items);
        }
Exemplo n.º 2
0
        public static void SetCheckpointCountToDispatch(String slotName, Func <double> valueProvider)
        {
            //These stats are valid only during a rebuild and not during standard working.
            if (!RebuildSettings.ShouldRebuild)
            {
                return;
            }

            String gaugeName;

            if (!String.IsNullOrEmpty(slotName))
            {
                gaugeName = _checkpointToDispatchRebuildGaugeName + "-" + slotName;
            }
            else
            {
                gaugeName = _checkpointToDispatchRebuildGaugeName;
            }
            if (TenantContext.CurrentTenantId != null)
            {
                gaugeName = "t[" + TenantContext.CurrentTenantId + "]" + gaugeName;
            }
            MetricsHelper.CreateGauge(gaugeName, valueProvider, Unit.Items);
        }
Exemplo n.º 3
0
 public static void SetProjectionEngineCurrentDispatchCount(Func <double> valueProvider)
 {
     MetricsHelper.CreateGauge(_projectionEngineCurrentDispatchCount, valueProvider, Unit.Custom(EventStoreFactory.PartitionCollectionName));
 }