Пример #1
0
        public static FlowStats CreateFromNetBytes(byte[] buffer, int offset, out int newOffset)
        {
            FlowStats flowStats = new FlowStats();

            flowStats.CountIopsRead  = (ulong)Utils.Int64FromNetBytes(buffer, offset); offset += 8;
            flowStats.CountIopsWrite = (ulong)Utils.Int64FromNetBytes(buffer, offset); offset += 8;
            for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
            {
                flowStats.TokSecRead[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
                offset += 8;
            }
            for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
            {
                flowStats.TokSecWrite[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
                offset += 8;
            }
            for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
            {
                flowStats.QLenRead[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
                offset += 8;
            }
            for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
            {
                flowStats.QLenWrite[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
                offset += 8;
            }
            for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
            {
                flowStats.InFlightRead[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
                offset += 8;
            }
            for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
            {
                flowStats.InFlightWrite[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
                offset += 8;
            }
            newOffset = offset;
            return(flowStats);
        }
Пример #2
0
 internal void SetFlowStats(FlowStats flowStats)
 {
     this.flowStats = flowStats;
 }
 public static FlowStats CreateFromNetBytes(byte[] buffer, int offset, out int newOffset)
 {
     FlowStats flowStats = new FlowStats();
     flowStats.CountIopsRead = (ulong)Utils.Int64FromNetBytes(buffer, offset); offset += 8;
     flowStats.CountIopsWrite = (ulong)Utils.Int64FromNetBytes(buffer, offset); offset += 8;
     for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
     {
         flowStats.TokSecRead[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
         offset += 8;
     }
     for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
     {
         flowStats.TokSecWrite[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
         offset += 8;
     }
     for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
     {
         flowStats.QLenRead[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
         offset += 8;
     }
     for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
     {
         flowStats.QLenWrite[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
         offset += 8;
     }
     for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
     {
         flowStats.InFlightRead[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
         offset += 8;
     }
     for (uint VecIdx = 0; VecIdx < Parameters.OKTO_MAX_VEC_LEN; VecIdx++)
     {
         flowStats.InFlightWrite[VecIdx] = (ulong)Utils.Int64FromNetBytes(buffer, offset);
         offset += 8;
     }
     newOffset = offset;
     return flowStats;
 }
Пример #4
0
 internal void SetFlowStats(FlowStats flowStats)
 {
     this.flowStats = flowStats;
 }