comparison Demo/Asp.Net/Web/Admin/Counters.aspx @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 <%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="Counters.aspx.cs" Inherits="Admin_Counters" Title="Counters" %>
2 <%@ Import Namespace="BLToolkit.Aspects" %>
3
4 <asp:Content ID="Content" ContentPlaceHolderID="cph" Runat="Server">
5
6 <table class="infoTable" cellspacing="0" cellpadding="0" border="0">
7 <tr>
8 <td style="text-align:left">GC.CollectionCount:</td><td><%= GC.CollectionCount(GC.MaxGeneration) %></td>
9 <td style="text-align:left;padding-left:20;">Cache Cleanup Times:</td><td><%= CacheAspect.CleanupThread.WorkTimes %></td>
10 <td style="text-align:left;padding-left:20;">Objects in Cache:</td><td><%= CacheAspect.CleanupThread.ObjectsInCache %></td>
11 </tr>
12
13 <tr>
14 <td style="text-align:left">GC.TotalMemory:</td><td><%= GC.GetTotalMemory(false)/(1024*1024) %>M</td>
15 <td style="text-align:left;padding-left:20;">Total Cleanup Time:</td><td><%= CacheAspect.CleanupThread.WorkTime %></td>
16 <td style="text-align:left;padding-left:20;">Objects Expired:</td><td><%= CacheAspect.CleanupThread.ObjectsExpired %></td>
17 </tr>
18 </table>
19 <br/>
20
21 <asp:Repeater ID="counterRepeater" runat="server" EnableViewState="false">
22 <HeaderTemplate>
23 <table class="grid" cellspacing="0" cellpadding="0" rules="all" border="1" style="width:100%;border-collapse:collapse">
24 <tr class="grid-header">
25 <th rowspan="2">Type</th><th rowspan="2">Method</th><th colspan="2">Calls</th><th colspan="2">Cache</th><th colspan="4">Call Time</th>
26 </tr>
27 <tr class="grid-header">
28 <th>Count</th><th>Ex</th><th>In</th><th>From</th><th>Min</th><th>Average</th><th>Max</th><th>Total</th>
29 </tr>
30 </HeaderTemplate>
31 <ItemTemplate><tr>
32 <td><%# GetName(((MethodCallCounter)Container.DataItem).MethodInfo.DeclaringType) %></td>
33 <td><%# ((MethodCallCounter)Container.DataItem).MethodInfo.Name %></td>
34 <td align="right"><%# ((MethodCallCounter)Container.DataItem).TotalCount %></td>
35 <td><%# ((MethodCallCounter)Container.DataItem).ExceptionCount == 0? "": ((MethodCallCounter)Container.DataItem).ExceptionCount.ToString() %></td>
36 <td align="right"><%# ((MethodCallCounter)Container.DataItem).CallMethodInfo.CacheAspect != null? ((MethodCallCounter)Container.DataItem).CallMethodInfo.CacheAspect.Cache.Count: 0 %></td>
37 <td align="right"><%# ((MethodCallCounter)Container.DataItem).CachedCount %></td>
38 <td><%# GetTime(((MethodCallCounter)Container.DataItem).MinTime) %></td>
39 <td><%# GetTime(((MethodCallCounter)Container.DataItem).AverageTime) %></td>
40 <td><%# GetTime(((MethodCallCounter)Container.DataItem).MaxTime) %></td>
41 <td><%# GetTime(((MethodCallCounter)Container.DataItem).TotalTime) %></td>
42 </tr><%# GetCurrent((MethodCallCounter)Container.DataItem) %></ItemTemplate>
43 <SeparatorTemplate>
44 </SeparatorTemplate>
45 <FooterTemplate></table></FooterTemplate>
46 </asp:Repeater>
47
48 <br/>
49 <font size="1">
50 <a href="Counters.aspx?cleanup=1">cache cleanup</a>
51 </font>
52
53 </asp:Content>