aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Statistics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Statistics')
-rw-r--r--OpenSim/Framework/Statistics/AssetStatsReporter.cs31
1 files changed, 23 insertions, 8 deletions
diff --git a/OpenSim/Framework/Statistics/AssetStatsReporter.cs b/OpenSim/Framework/Statistics/AssetStatsReporter.cs
index 4489c65..bcd3a75 100644
--- a/OpenSim/Framework/Statistics/AssetStatsReporter.cs
+++ b/OpenSim/Framework/Statistics/AssetStatsReporter.cs
@@ -40,11 +40,15 @@ namespace OpenSim.Grid.AssetServer
40 private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000); 40 private Timer ageStatsTimer = new Timer(24 * 60 * 60 * 1000);
41 private DateTime startTime = DateTime.Now; 41 private DateTime startTime = DateTime.Now;
42 42
43 private long assetRequestsToday; 43 private long assetRequestsToday;
44 private long assetRequestsNotFoundToday;
44 private long assetRequestsYesterday; 45 private long assetRequestsYesterday;
46 private long assetRequestsNotFoundYesterday;
45 47
46 public long AssetRequestsToday { get { return assetRequestsToday; } } 48 public long AssetRequestsToday { get { return assetRequestsToday; } }
47 public long AssetRequestsYesterday { get { return assetRequestsYesterday; } } 49 public long AssetRequestsNotFoundToday { get { return assetRequestsNotFoundToday; } }
50 public long AssetRequestsYesterday { get { return assetRequestsYesterday; } }
51 public long AssetRequestsNotFoundYesterday { get { return assetRequestsNotFoundYesterday; } }
48 52
49 public AssetStatsReporter() 53 public AssetStatsReporter()
50 { 54 {
@@ -58,7 +62,18 @@ namespace OpenSim.Grid.AssetServer
58 62
59 // There is a possibility that an asset request could occur between the execution of these 63 // There is a possibility that an asset request could occur between the execution of these
60 // two statements. But we're better off without the synchronization overhead. 64 // two statements. But we're better off without the synchronization overhead.
61 assetRequestsToday = 0; 65 assetRequestsToday = 0;
66
67 assetRequestsNotFoundYesterday = assetRequestsNotFoundToday;
68 assetRequestsNotFoundToday = 0;
69 }
70
71 /// <summary>
72 /// Record that an asset request failed to find an asset
73 /// </summary>
74 public void AddNotFoundRequest()
75 {
76 assetRequestsNotFoundToday++;
62 } 77 }
63 78
64 /// <summary> 79 /// <summary>
@@ -82,10 +97,10 @@ namespace OpenSim.Grid.AssetServer
82 long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0); 97 long assetRequestsYesterdayPerHour = (long)Math.Round(AssetRequestsYesterday / 24.0);
83 98
84 return string.Format( 99 return string.Format(
85@"Asset requests today : {0} ({1} per hour) 100@"Asset requests today : {0} ({1} per hour) of which {2} were not found
86Asset requests yesterday : {2} ({3} per hour)", 101Asset requests yesterday : {3} ({4} per hour) of which {5} were not found",
87 AssetRequestsToday, assetRequestsTodayPerHour, 102 AssetRequestsToday, assetRequestsTodayPerHour, AssetRequestsNotFoundToday,
88 AssetRequestsYesterday, assetRequestsYesterdayPerHour); 103 AssetRequestsYesterday, assetRequestsYesterdayPerHour, AssetRequestsNotFoundYesterday);
89 } 104 }
90 } 105 }
91} 106}