예제 #1
0
        public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
        {
            long totalBytesSent         = ClientBase.TotalBytesSent;
            long totalBytesReceived     = ClientBase.TotalBytesReceived;
            int  totalSegmentCount      = BufferManager.Default.TotalSegmentCount;
            int  availableSegmentsCount = BufferManager.Default.AvailableSegmentsCount;
            long globalAllocatedMemory  = BufferManager.GlobalAllocatedMemory;

            trigger.Reply("[Network] Total data sent: {0}, Total data received: {1}",
                          (object)WCellUtil.FormatBytes(totalBytesSent),
                          (object)WCellUtil.FormatBytes(totalBytesReceived));
            trigger.Reply("[Buffers] {0} available packet buffers out of {1}",
                          (object)availableSegmentsCount.ToString(), (object)totalSegmentCount.ToString());
            trigger.Reply("[Buffers] {0} allocated globally",
                          (object)WCellUtil.FormatBytes(globalAllocatedMemory));
        }
예제 #2
0
    public override void Process(CmdTrigger <RealmServerCmdArgs> trigger)
    {
        long totalDataSent, totalDataReceived, totalAllocMemory;
        int  bufferPoolSize, bufferPoolAvail;

        totalDataSent     = RealmClient.TotalBytesSent;
        totalDataReceived = RealmClient.TotalBytesReceived;

        bufferPoolSize   = BufferManager.Default.TotalSegmentCount;
        bufferPoolAvail  = BufferManager.Default.AvailableSegmentsCount;
        totalAllocMemory = BufferManager.GlobalAllocatedMemory;

        trigger.Reply("[Network] Total data sent: {0}, Total data received: {1}",
                      WCellUtil.FormatBytes(totalDataSent),
                      WCellUtil.FormatBytes(totalDataReceived));
        trigger.Reply("[Buffers] {0} available packet buffers out of {1}",
                      bufferPoolAvail.ToString(), bufferPoolSize.ToString());
        trigger.Reply("[Buffers] {0} allocated globally", WCellUtil.FormatBytes(totalAllocMemory));
    }