57 |
58 |
FCN Mode
59 |
60 | - This is the detected FCN Mode: @fcnVal
61 |
62 |
FileChangesMonitor directory monitor hash table
63 |
64 |
65 |
66 | Directory watched |
67 | File monitor count |
68 |
69 |
70 | @{
71 | var totalFileWatchers = 0;
72 | }
73 | @foreach (System.Collections.DictionaryEntry d in dirs)
74 | {
75 | var fileMons = (Hashtable) d.Value.GetType()
76 | .GetField("_fileMons", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase)
77 | .GetValue(d.Value);
78 |
79 | //I'm not sure what the difference with the result of this is, the decompiled source
80 | //excludes file monitors that have something to do with "_cShortNames"
81 | var fileMonsCount = d.Value.GetType()
82 | .GetMethod("GetFileMonitorsCount", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.IgnoreCase)
83 | .Invoke(d.Value, null);
84 |
85 | totalFileWatchers += fileMons.Count;
86 |
87 | @d.Key |
88 | @fileMons.Count |
89 |
90 | }
91 |
92 |
93 | @dirs.Count |
94 | @totalFileWatchers |
95 |
96 |
97 |
98 |
FCN Mode 'Single' dir monitor properties
99 |
100 | - FileChangesMonitor._dirMonAppPathInternal = @dirMonAppPathInternal
101 | - @dirMonAppPathInternalName
102 | - _dirMonAppPathInternal._isDirMonAppPathInternal = @dirMonAppPathInternalIsDirMonAppPathInternal
103 | - _dirMonAppPathInternal._dirMonCompletion = @dirMonAppPathInternalDirMonCompletion
104 |
105 |
Normal sub dir monitor properties
106 |
107 | - FileChangesMonitor._dirMonSubdirs = @dirMonSubdirs
108 | - @dirMonSubdirsName
109 | - _dirMonSubdirs._isDirMonAppPathInternal = @dirMonSubdirsIsDirMonAppPathInternal
110 | - _dirMonSubdirs._dirMonCompletion = @dirMonSubdirsDirMonCompletion
111 |
112 |
113 |
114 | @{
115 | PerformanceCounter pc1 = new PerformanceCounter("ASP.NET Applications",
116 | "Requests Total",
117 | "__Total__");
118 |
119 | PerformanceCounter pc2 = new PerformanceCounter("ASP.NET",
120 | "Application Restarts");
121 |
122 | Type t = typeof(HttpRuntime).Assembly.GetType(
123 | "System.Web.DirMonCompletion");
124 |
125 | int dirMonCount = (int)t.InvokeMember("_activeDirMonCompletions",
126 | BindingFlags.NonPublic
127 | | BindingFlags.Static
128 | | BindingFlags.GetField,
129 | null,
130 | null,
131 | null);
132 |
133 | // The perf client polls the server every 400 milliseconds
134 | System.Threading.Thread.Sleep(800);
135 |
136 | //Response.Output.WriteLine(
137 | // "Requests={0},Restarts={1},DirMonCompletions={2}",
138 | // pc1.NextValue(),
139 | // pc2.NextValue(),
140 | // dirMonCount);
141 | }
142 |
Performance monitor properties
143 |
144 | - ASP.NET Applications - Requests Total = @pc1.NextValue()
145 | - ASP.NET - Application Restarts = @pc2.NextValue()
146 | - DirMonCompletions = @dirMonCount
147 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/src/Web/global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Inherits="Umbraco.Web.UmbracoApplication" Language="C#" %>
2 | <%@ Import namespace="System.Diagnostics" %>
3 | <%@ Import namespace="System.Reflection" %>
4 | <%@ Import namespace="System.Web.Hosting" %>
5 | <%@ Import namespace="Umbraco.Core" %>
6 | <%@ Import namespace="Umbraco.Core.Logging" %>
7 |
8 |
49 |
--------------------------------------------------------------------------------