示例#1
0
 private void SubmitTraceEventGUI(CompilerEvent compilerEvent, string info)
 {
     if (compilerEvent != CompilerEvent.DebugInfo)
     {
         SetStatus(compilerEvent.ToText() + ": " + info);
         toolStripStatusLabel1.GetCurrentParent().Refresh();
     }
 }
示例#2
0
        void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            lock (_statusLock)
            {
                Status = compilerEvent.ToText() + ": " + message;
            }

            SubmitTraceEvent(compilerEvent, message, threadID);
        }
示例#3
0
        private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            message = string.IsNullOrWhiteSpace(message) ? string.Empty : $"{message}";

            var status = $"{compilerEvent.ToText()}{message}";

            lock (_statusLock)
            {
                Status = status;
            }

            SubmitTraceEvent(compilerEvent, message, threadID);
        }
示例#4
0
        private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            if (compilerEvent != CompilerEvent.Counter)
            {
                var status = compilerEvent.ToText() + (string.IsNullOrWhiteSpace(message) ? string.Empty : $": {message}");

                lock (_statusLock)
                {
                    Status = status;
                }
            }

            SubmitTraceEvent(compilerEvent, message, threadID);
        }
示例#5
0
 private void SubmitTraceEvent(CompilerEvent compilerStage, string message, int threadID)
 {
     lock (compilerStageLock)
     {
         if (compilerStage == CompilerEvent.Error)
         {
             errorLog.Append(compilerStage.ToText()).Append(": ").AppendLine(message);
             compileLog.AppendFormat("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds).Append(" [").Append(threadID.ToString()).Append("] ").Append(compilerStage.ToText()).Append(": ").AppendLine(message);
         }
         if (compilerStage == CompilerEvent.Exception)
         {
             var stringBuilder  = exceptionLog.Append(compilerStage.ToText()).Append(": ").AppendLine(message);
             var stringBuilder2 = compileLog.AppendFormat("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds).Append(" [").Append(threadID.ToString()).Append("] ").Append(compilerStage.ToText()).Append(": ").AppendLine(message);
         }
         else if (compilerStage == CompilerEvent.Counter)
         {
             counterLog.Append(compilerStage.ToText()).Append(": ").AppendLine(message);
         }
         else
         {
             compileLog.AppendFormat("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds).Append(" [").Append(threadID.ToString()).Append("] ").Append(compilerStage.ToText()).Append(": ").AppendLine(message);
         }
     }
 }
示例#6
0
 private void SubmitTraceEvent(CompilerEvent compilerStage, string message, int threadID)
 {
     lock (compilerStageLock)
     {
         if (compilerStage == CompilerEvent.Error)
         {
             errorLog.AppendLine(compilerStage.ToText() + ": " + message);
             compileLog.AppendLine(String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " [" + threadID.ToString() + "] " + compilerStage.ToText() + ": " + message);
         }
         if (compilerStage == CompilerEvent.Exception)
         {
             exceptionLog.AppendLine(compilerStage.ToText() + ": " + message);
             compileLog.AppendLine(String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " [" + threadID.ToString() + "] " + compilerStage.ToText() + ": " + message);
         }
         else if (compilerStage == CompilerEvent.Counter)
         {
             counterLog.AppendLine(compilerStage.ToText() + ": " + message);
         }
         else
         {
             compileLog.AppendLine(String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " [" + threadID.ToString() + "] " + compilerStage.ToText() + ": " + message);
         }
     }
 }
        void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerStage, string message, int threadID)
        {
            lock (mylock)
            {
                if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd || compilerStage == CompilerEvent.Exception)
                {
                    string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - builder.CompileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + message;

                    builder.AddOutput(status);
                }
                else if (compilerStage == CompilerEvent.Counter)
                {
                    builder.AddCounters(message);
                }
            }
        }
示例#8
0
        private void SubmitTraceEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            var part = string.IsNullOrWhiteSpace(message) ? string.Empty : ": " + message;
            var msg  = $"{compilerEvent.ToText()}{part}";

            var timelog = $"{(DateTime.Now - compileStartTime).TotalSeconds:0.00} [{threadID}] {msg}";

            lock (compilerStageLock)
            {
                if (compilerEvent == CompilerEvent.Error)
                {
                    UpdateLog("Error", msg);
                    UpdateLog("Compiler", timelog);
                }
                if (compilerEvent == CompilerEvent.Exception)
                {
                    UpdateLog("Exception", msg);
                    UpdateLog("Compiler", timelog);
                }
                else if (compilerEvent == CompilerEvent.Counter)
                {
                    if (message.StartsWith("Transform-"))
                    {
                        UpdateLog("Transforms", message.Substring(10));
                    }
                    else
                    {
                        UpdateLog("Counters", message);
                    }
                }
                else
                {
                    UpdateLog("Compiler", timelog);
                }
            }
        }
示例#9
0
 private string CreateTimeStampedLog(CompilerEvent compilerEvent, string message, int threadID = 0)
 {
     return($"{(DateTime.Now - compileStartTime).TotalSeconds:0.00} [{threadID.ToString()}] {compilerEvent.ToText()}: {message}");
 }
示例#10
0
        private void SubmitTraceEvent(CompilerEvent compilerStage, string info)
        {
            if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd)
            {
                string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + info;

                toolStripStatusLabel1.Text = status;
                toolStripStatusLabel1.GetCurrentParent().Refresh();

                AddOutput(status);
            }
        }
        void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            if (compilerEvent == CompilerEvent.PreCompileStageStart ||
                compilerEvent == CompilerEvent.PreCompileStageEnd ||
                compilerEvent == CompilerEvent.PostCompileStageStart ||
                compilerEvent == CompilerEvent.PostCompileStageEnd ||
                compilerEvent == CompilerEvent.Exception)
            {
                string status = $"Compiling: {$"{(DateTime.Now - builder.CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}: {message}";

                lock (_lock)
                {
                    builder.AddOutput(status);
                }
            }
            else if (compilerEvent == CompilerEvent.Counter)
            {
                lock (_lock)
                {
                    builder.AddCounters(message);
                }
            }
        }
示例#12
0
        void ICompilerEventListener.SubmitTraceEvent(CompilerEvent compilerStage, string info)
        {
            if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd)
            {
                string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - compileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + info;

                toolStripStatusLabel1.Text = status;
                toolStripStatusLabel1.GetCurrentParent().Refresh();

                AddOutput(status);
            }
        }
示例#13
0
 private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID)
 {
     if (compilerEvent != CompilerEvent.MethodCompileEnd &&
         compilerEvent != CompilerEvent.MethodCompileStart &&
         compilerEvent != CompilerEvent.Counter &&
         compilerEvent != CompilerEvent.SetupStageStart &&
         compilerEvent != CompilerEvent.SetupStageEnd &&
         compilerEvent != CompilerEvent.FinalizationStageStart &&
         compilerEvent != CompilerEvent.FinalizationStageEnd)
     {
         message = string.IsNullOrWhiteSpace(message) ? string.Empty : $": {message}";
         Console.WriteLine($"{(DateTime.Now - CompileStartTime).TotalSeconds:0.00} [{threadID}] {compilerEvent.ToText()}{message}");
     }
 }
示例#14
0
        private string CreateTimeStampedLog(CompilerEvent compilerEvent, string message, int threadID = 0)
        {
            message = string.IsNullOrWhiteSpace(message) ? string.Empty : $": {message}";

            return($"{(DateTime.Now - compileStartTime).TotalSeconds:0.00} [{threadID.ToString()}] {compilerEvent.ToText()}{message}");
        }
示例#15
0
        void ITraceListener.OnNewCompilerTraceEvent(CompilerEvent compilerStage, string message, int threadID)
        {
            lock (mylock)
            {
                if (compilerStage == CompilerEvent.CompilerStageStart || compilerStage == CompilerEvent.CompilerStageEnd || compilerStage == CompilerEvent.Exception)
                {
                    string status = "Compiling: " + String.Format("{0:0.00}", (DateTime.Now - builder.CompileStartTime).TotalSeconds) + " secs: " + compilerStage.ToText() + ": " + message;

                    builder.AddOutput(status);
                }
                else if (compilerStage == CompilerEvent.Counter)
                {
                    builder.AddCounters(message);
                }
            }
        }
示例#16
0
        private void NotifyEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            if (compilerEvent == CompilerEvent.CompileStart ||
                compilerEvent == CompilerEvent.CompileEnd ||
                compilerEvent == CompilerEvent.CompilingMethods ||
                compilerEvent == CompilerEvent.CompilingMethodsCompleted ||
                compilerEvent == CompilerEvent.InlineMethodsScheduled ||
                compilerEvent == CompilerEvent.LinkingStart ||
                compilerEvent == CompilerEvent.LinkingEnd ||
                compilerEvent == CompilerEvent.Warning ||
                compilerEvent == CompilerEvent.Error ||
                compilerEvent == CompilerEvent.Exception)
            {
                string status = $"Compiling: {$"{(DateTime.Now - CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}";

                if (!string.IsNullOrEmpty(message))
                {
                    status += $"- { message}";
                }

                Output(status);
            }
            else if (compilerEvent == CompilerEvent.Counter)
            {
                AddCounters(message);
            }
        }
示例#17
0
        void ITraceListener.OnCompilerEvent(CompilerEvent compilerEvent, string message, int threadID)
        {
            if (compilerEvent == CompilerEvent.CompilerStart ||
                compilerEvent == CompilerEvent.CompilerEnd ||
                compilerEvent == CompilerEvent.CompilingMethods ||
                compilerEvent == CompilerEvent.CompilingMethodsCompleted ||
                compilerEvent == CompilerEvent.InlineMethodsScheduled ||
                compilerEvent == CompilerEvent.LinkingStart ||
                compilerEvent == CompilerEvent.LinkingEnd ||
                compilerEvent == CompilerEvent.Warning ||
                compilerEvent == CompilerEvent.Error ||
                compilerEvent == CompilerEvent.Exception)
            {
                string status = $"Compiling: {$"{(DateTime.Now - builder.CompileStartTime).TotalSeconds:0.00}"} secs: {compilerEvent.ToText()}";

                if (!string.IsNullOrEmpty(message))
                {
                    status += $"- { message}";
                }

                lock (_lock)
                {
                    builder.AddOutput(status);
                }
            }
            else if (compilerEvent == CompilerEvent.Counter)
            {
                lock (_lock)
                {
                    builder.AddCounters(message);
                }
            }
        }