Example #1
0
        private void HeartbeatVersion42000(TransactionOperationContext ctx, MaintenanceReport report)
        {
            report.ServerReport = new ServerReport
            {
                OutOfCpuCredits = _server.Server.CpuCreditsBalance.BackgroundTasksAlertRaised.IsRaised()
            };

            using (var writer = new BlittableJsonTextWriter(ctx, _tcp.Stream))
            {
                ctx.Write(writer, report.ToJson());
            }
        }
        private void HeartbeatVersion42000(TransactionOperationContext ctx, MaintenanceReport report)
        {
            report.ServerReport = new ServerReport
            {
                OutOfCpuCredits  = _server.Server.CpuCreditsBalance.BackgroundTasksAlertRaised.IsRaised(),
                EarlyOutOfMemory = LowMemoryNotification.Instance.IsEarlyOutOfMemory,
                HighDirtyMemory  = LowMemoryNotification.Instance.DirtyMemoryState.IsHighDirty
            };

            using (var writer = new BlittableJsonTextWriter(ctx, _tcp.Stream))
            {
                ctx.Write(writer, report.ToJson());
            }
        }