Make number of inbound http requests handled available as a httpserver.<port>.IncomingHTTPRequestsProcessed stat

This commit is contained in:
Justin Clark-Casey (justincc)
2013-06-18 23:07:18 +01:00
parent 768e8e363b
commit 9501a583cb
4 changed files with 36 additions and 6 deletions

View File

@@ -27,8 +27,9 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using log4net;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework.Monitoring
@@ -38,6 +39,8 @@ namespace OpenSim.Framework.Monitoring
/// </summary>
public class Stat : IDisposable
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Category of this stat (e.g. cache, scene, etc).
/// </summary>
@@ -204,6 +207,8 @@ namespace OpenSim.Framework.Monitoring
if (m_samples.Count >= m_maxSamples)
m_samples.Dequeue();
// m_log.DebugFormat("[STAT]: Recording value {0} for {1}", newValue, Name);
m_samples.Enqueue(newValue);
}
}