Пример #1
0
        private void Begin(string title)
        {
            Stack.SetFix(new MonitorData
            {
                Title = title
            });
            InMonitor = true;
#if !NETSTANDARD2_0
            if (!AppDomain.MonitoringIsEnabled)
            {
                AppDomain.MonitoringIsEnabled = true;
            }
#endif
            {
                Stack.SetFix(new MonitorData
                {
                    Title = title
                });
                Texter.AppendLine(
                    $"<<RequestId:{LogRecorder.GetRequestId()}>>*<<Machine:{LogRecorder.GetMachineName()}>>");
                Texter.Append(' ', 24);
                Texter.Append("标题");
                Texter.Append(' ', 24);
                Texter.Append("|状态|   时间   |   用 时(ms)   |");
#if !NETSTANDARD2_0
                Texter.Append("|  CPU(ms) |内存分配Kb| 总分配Mb |内存驻留Kb| 总驻留Mb |");
#endif
                Write(title, 0);
            }
        }
Пример #2
0
        private void Begin(string title)
        {
            InMonitor = true;
#if !NETCOREAPP
            if (!AppDomain.MonitoringIsEnabled)
            {
                AppDomain.MonitoringIsEnabled = true;
            }
#endif
            {
                Stack.SetFix(new MonitorData
                {
                    Title = title
                });
                Texter.AppendLine($@"
 Date:{DateTime.Now}    RequestId:{LogRecorder.GetRequestId()}    Machine:{LogRecorder.GetMachineName()}");
                Texter.Append(' ', 24);
                Texter.Append("标题");
                Texter.Append(' ', 24);
                Texter.Append("|状态|   时间   |   用 时(ms)   |");
#if !NETCOREAPP
                Texter.Append("|  CPU(ms) |内存分配Kb| 总分配Mb |内存驻留Kb| 总驻留Mb |");
#endif
                Write(title, ItemType.First);
            }
        }
Пример #3
0
        private void Begin(string title)
        {
            InMonitor = true;
#if !NETCOREAPP
            if (!AppDomain.MonitoringIsEnabled)
            {
                AppDomain.MonitoringIsEnabled = true;
            }
#endif
            {
                Stack.SetFix(new MonitorData
                {
                    Title = title
                });
                //Texter.Append("标题");
                //Texter.Append(' ', 24);
                //Texter.Append("|状态|   时间   |   用 时(ms)   |");
//#if !NETCOREAPP
//                Texter.Append("|  CPU(ms) |内存分配Kb| 总分配Mb |内存驻留Kb| 总驻留Mb |");
//#endif
                Write(title, ItemType.First);
            }
        }