public PerformanceLogEntry(Nfs3Command command, UInt32 callTimeMicroseconds, Int32 extraData) { this.timestamp = (Stopwatch.GetTimestamp() - NfsServerLog.stopwatchTicksBase).StopwatchTicksAsDoubleMilliseconds(); this.command = command; this.callTimeMicroseconds = callTimeMicroseconds; this.extraData = extraData; }
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(); }
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)); }
public void Log(Nfs3Command command, UInt32 callTimeMicroseconds, Int32 extraData) { storedCommands.Add(new PerformanceLogEntry(command, callTimeMicroseconds, extraData)); }