Exemple #1
0
 public PerformanceLogEntry(Nfs3Command command, UInt32 callTimeMicroseconds, Int32 extraData)
 {
     this.timestamp            = (Stopwatch.GetTimestamp() - NfsServerLog.stopwatchTicksBase).StopwatchTicksAsDoubleMilliseconds();
     this.command              = command;
     this.callTimeMicroseconds = callTimeMicroseconds;
     this.extraData            = extraData;
 }
Exemple #2
0
        public void Log(Nfs3Command command, UInt32 callTimeMicroseconds, Int32 extraData)
        {
            Double timestamp = (Stopwatch.GetTimestamp() - NfsServerLog.stopwatchTicksBase).StopwatchTicksAsDoubleMilliseconds();

            writer.WriteLine(NfsServerLog.PerformanceLogString(timestamp, command, callTimeMicroseconds, extraData));
            writer.Flush();
        }
Exemple #3
0
        public static String PerformanceLogString(Double timestamp, Nfs3Command command, UInt32 callTimeMicroseconds, Int32 extraData)
        {
            String extraDataString = "";

            if (command == Nfs3Command.READ || command == Nfs3Command.WRITE)
            {
                extraDataString = String.Format(" length was {0}", extraData);
            }
            return(String.Format("At {0,8:0.00} milliseconds Call '{1,12}' Took {2,8:0.00} milliseconds{3}",
                                 timestamp, command, (Double)callTimeMicroseconds / 1000, extraDataString));
        }
Exemple #4
0
 public void Log(Nfs3Command command, UInt32 callTimeMicroseconds, Int32 extraData)
 {
     storedCommands.Add(new PerformanceLogEntry(command, callTimeMicroseconds, extraData));
 }