Beispiel #1
0
 public virtual void DisplayStatistics(long totalRecordCount, long totalRecordBytes)
 {
     Console.WriteLine();
     Console.WriteLine(this.RecordType);
     Console.WriteLine("\t Count:\t\t\t{0}", this.Count);
     Console.WriteLine("\t Count Percent:\t\t{0}% of total count", StatUtility.GetPercent(this.Count, totalRecordCount));
     Console.WriteLine("\t Bytes:\t\t\t{0}", StatUtility.GetBytesString(this.TotalBytes));
     Console.WriteLine("\t Bytes Percent:\t\t{0}% of total bytes", StatUtility.GetPercent(this.TotalBytes, totalRecordBytes));
     Console.WriteLine("\t Average Bytes:\t\t{0}", StatUtility.GetBytesString(this.AverageBytes));
 }
        private void DisplaySummaryStatistics()
        {
            OperationLogRecordStats beginTransactionStats = this.GetOperationStats(LogRecordType.BeginTransaction);
            OperationLogRecordStats operationStats        = this.GetOperationStats(LogRecordType.Operation);

            Console.WriteLine();
            Console.WriteLine("SUMMARY");
            Console.WriteLine("-------------------------------------");
            Console.WriteLine("Total records:\t\t\t\t{0}", this.TotalRecordCount);
            Console.WriteLine("Total bytes:\t\t\t\t{0}", StatUtility.GetBytesString(this.TotalRecordBytes));
            this.DisplayBarrierStatistics();

            long operationBytes = beginTransactionStats.TotalBytes + operationStats.TotalBytes;

            long metaDataBytes      = beginTransactionStats.MetaDataBytes + operationStats.MetaDataBytes;
            long redoBytes          = beginTransactionStats.RedoBytes + operationStats.RedoBytes;
            long undoBytes          = beginTransactionStats.UndoBytes + operationStats.UndoBytes;
            long operationDataBytes = metaDataBytes + redoBytes + undoBytes;

            long operationDataOverheadBytes = beginTransactionStats.RecordOverheadBytes + operationStats.RecordOverheadBytes;

            long stateManagerMetaDataBytes = beginTransactionStats.ApproximateStateManagerMetaDataBytes + operationStats.ApproximateStateManagerMetaDataBytes;

            long stateProviderMetaDataBytes      = beginTransactionStats.StateProviderMetaDataBytes + operationStats.StateProviderMetaDataBytes;
            long stateProviderRedoBytes          = beginTransactionStats.StateProviderRedoBytes + operationStats.StateProviderRedoBytes;
            long stateProviderUndoBytes          = beginTransactionStats.StateProviderUndoBytes + operationStats.StateProviderUndoBytes;
            long stateProviderOperationDataBytes = stateProviderMetaDataBytes + stateProviderRedoBytes + stateProviderUndoBytes;

            long userMetaDataBytes      = beginTransactionStats.UserMetaDataBytes + operationStats.UserMetaDataBytes;
            long userRedoBytes          = beginTransactionStats.UserRedoBytes + operationStats.UserRedoBytes;
            long userUndoBytes          = beginTransactionStats.UserUndoBytes + operationStats.UserUndoBytes;
            long userOperationDataBytes = userMetaDataBytes + userRedoBytes + userUndoBytes;

            Console.WriteLine("-------------------------------------");
            Console.WriteLine("Total Operation bytes:\t\t\t{0}", StatUtility.GetBytesString(operationBytes));
            Console.WriteLine("Total Operation Percent:\t\t{0}% of total bytes", StatUtility.GetPercent(operationBytes, this.TotalRecordBytes));
            Console.WriteLine("- Metadata/Redo/Undo overhead bytes:\t{0}", StatUtility.GetBytesString(operationDataOverheadBytes));
            Console.WriteLine("- Metadata/Redo/Undo overhead Percent:\t{0}% of total bytes", StatUtility.GetPercent(operationDataOverheadBytes, this.TotalRecordBytes));
            Console.WriteLine("- Metadata/Redo/Undo bytes:\t\t{0}", StatUtility.GetBytesString(operationDataBytes));
            Console.WriteLine("- Metadata/Redo/Undo Percent:\t\t{0}% of total bytes", StatUtility.GetPercent(operationDataBytes, this.TotalRecordBytes));
            Console.WriteLine("-------------------------------------");
            Console.WriteLine("StateManager Metadata bytes:\t\t\t{0}", StatUtility.GetBytesString(stateManagerMetaDataBytes));
            Console.WriteLine("StateManager Metadata Percent:\t\t\t{0}% of total bytes", StatUtility.GetPercent(stateManagerMetaDataBytes, this.TotalRecordBytes));
            Console.WriteLine("StateProvider Metadata/Redo/Undo bytes:\t\t{0}", StatUtility.GetBytesString(stateProviderOperationDataBytes));
            Console.WriteLine("StateProvider Metadata/Redo/Undo Percent:\t{0}% of total bytes", StatUtility.GetPercent(stateProviderOperationDataBytes, this.TotalRecordBytes));
            Console.WriteLine("- User Metadata/Redo/Undo bytes:\t\t{0}", StatUtility.GetBytesString(userOperationDataBytes));
            Console.WriteLine("- User Metadata/Redo/Undo Percent:\t\t{0}% of total bytes", StatUtility.GetPercent(userOperationDataBytes, this.TotalRecordBytes));
        }
Beispiel #3
0
        public override void DisplayStatistics(long totalRecordCount, long totalRecordBytes)
        {
            base.DisplayStatistics(totalRecordCount, totalRecordBytes);

            Console.WriteLine("\t -------------------------------------");
            Console.WriteLine("\t Metadata segments:\t{0}\t(avg: {1})", this.MetaDataSegments, StatUtility.GetAverage(this.MetaDataSegments, this.Count));
            Console.WriteLine("\t Redo data segments:\t{0}\t(avg: {1})", this.RedoSegments, StatUtility.GetAverage(this.RedoSegments, this.Count));
            Console.WriteLine("\t Undo data segments:\t{0}\t(avg: {1})", this.UndoSegments, StatUtility.GetAverage(this.UndoSegments, this.Count));
            Console.WriteLine("\t Metadata bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.MetaDataBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.MetaDataBytes, this.Count)));
            Console.WriteLine("\t Metadata Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.MetaDataBytes, this.TotalBytes));
            Console.WriteLine("\t Metadata Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.MetaDataBytes, totalRecordBytes));
            Console.WriteLine("\t Redo data bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.RedoBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.RedoBytes, this.Count)));
            Console.WriteLine("\t Redo data Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.RedoBytes, this.TotalBytes));
            Console.WriteLine("\t Redo data Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.RedoBytes, totalRecordBytes));
            Console.WriteLine("\t Undo data bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.UndoBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.UndoBytes, this.Count)));
            Console.WriteLine("\t Undo data Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.UndoBytes, this.TotalBytes));
            Console.WriteLine("\t Undo data Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.UndoBytes, totalRecordBytes));
            Console.WriteLine("\t -------------------------------------");
            Console.WriteLine("\t Record overhead bytes:\t\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.RecordOverheadBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.RecordOverheadBytes, this.Count)));
            Console.WriteLine("\t Record overhead Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.RecordOverheadBytes, this.TotalBytes));
            Console.WriteLine("\t Record overhead Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.RecordOverheadBytes, totalRecordBytes));
            Console.WriteLine("\t -------------------------------------");
            Console.WriteLine("\t StateManager Metadata bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.ApproximateStateManagerMetaDataBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.ApproximateStateManagerMetaDataBytes, this.Count)));
            Console.WriteLine("\t StateManager Metadata Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.ApproximateStateManagerMetaDataBytes, this.TotalBytes));
            Console.WriteLine("\t StateManager Metadata Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.ApproximateStateManagerMetaDataBytes, totalRecordBytes));
            Console.WriteLine("\t -------------------------------------");
            Console.WriteLine("\t StateProvider Metadata bytes:\t\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.StateProviderMetaDataBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.StateProviderMetaDataBytes, this.Count)));
            Console.WriteLine("\t StateProvider Metadata Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.StateProviderMetaDataBytes, this.TotalBytes));
            Console.WriteLine("\t StateProvider Metadata Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.StateProviderMetaDataBytes, totalRecordBytes));
            Console.WriteLine("\t StateProvider Redo bytes:\t\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.StateProviderRedoBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.StateProviderRedoBytes, this.Count)));
            Console.WriteLine("\t StateProvider Redo Percent:\t\t{0}% of record bytes", StatUtility.GetPercent(this.StateProviderRedoBytes, this.TotalBytes));
            Console.WriteLine("\t StateProvider Redo Percent:\t\t{0}% of total bytes", StatUtility.GetPercent(this.StateProviderRedoBytes, totalRecordBytes));
            Console.WriteLine("\t StateProvider Undo bytes:\t\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.StateProviderUndoBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.StateProviderUndoBytes, this.Count)));
            Console.WriteLine("\t StateProvider Undo Percent:\t\t{0}% of record bytes", StatUtility.GetPercent(this.StateProviderUndoBytes, this.TotalBytes));
            Console.WriteLine("\t StateProvider Undo Percent:\t\t{0}% of total bytes", StatUtility.GetPercent(this.StateProviderUndoBytes, totalRecordBytes));
            Console.WriteLine("\t -------------------------------------");
            Console.WriteLine("\t User Metadata bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.UserMetaDataBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.UserMetaDataBytes, this.Count)));
            Console.WriteLine("\t User Metadata Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.UserMetaDataBytes, this.TotalBytes));
            Console.WriteLine("\t User Metadata Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.UserMetaDataBytes, totalRecordBytes));
            Console.WriteLine("\t User Redo bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.UserRedoBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.UserRedoBytes, this.Count)));
            Console.WriteLine("\t User Redo Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.UserRedoBytes, this.TotalBytes));
            Console.WriteLine("\t User Redo Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.UserRedoBytes, totalRecordBytes));
            Console.WriteLine("\t User Undo bytes:\t{0}\t(avg: {1})", StatUtility.GetBytesString(this.UserUndoBytes), StatUtility.GetBytesString(StatUtility.GetAverage(this.UserUndoBytes, this.Count)));
            Console.WriteLine("\t User Undo Percent:\t{0}% of record bytes", StatUtility.GetPercent(this.UserUndoBytes, this.TotalBytes));
            Console.WriteLine("\t User Undo Percent:\t{0}% of total bytes", StatUtility.GetPercent(this.UserUndoBytes, totalRecordBytes));
        }