aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/Stats
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-06-20 00:00:39 +0100
committerJustin Clark-Casey (justincc)2013-06-20 00:00:39 +0100
commit086fd70a5fdfd9b3a0e56201596f6d6bb20f391e (patch)
treeff230f73060ae70ca24f49e716a97267a11d88e2 /OpenSim/Framework/Monitoring/Stats
parentDisplay existing statistic of how many http requests a server is making as se... (diff)
downloadopensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.zip
opensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.tar.gz
opensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.tar.bz2
opensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.tar.xz
Make it possible to specify display of stats in a particular 'container' by separating category and container with a period.
e.g. "show stats server.network" I failed to realize this had already been implemented without the period in the show stats command (as the command help had not been updated). However, I would prefer the . approach as it will allow specifying multiple stats, easier wildcarding, etc. This commit also prevents any stat from having a period in its short name.
Diffstat (limited to 'OpenSim/Framework/Monitoring/Stats')
-rw-r--r--OpenSim/Framework/Monitoring/Stats/Stat.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs
index 85d1a78..c57ee0c 100644
--- a/OpenSim/Framework/Monitoring/Stats/Stat.cs
+++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Monitoring
42 { 42 {
43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 public static readonly char[] DisallowedShortNameCharacters = { '.' };
46
45 /// <summary> 47 /// <summary>
46 /// Category of this stat (e.g. cache, scene, etc). 48 /// Category of this stat (e.g. cache, scene, etc).
47 /// </summary> 49 /// </summary>
@@ -166,6 +168,12 @@ namespace OpenSim.Framework.Monitoring
166 throw new Exception( 168 throw new Exception(
167 string.Format("Stat cannot be in category '{0}' since this is reserved for a subcommand", category)); 169 string.Format("Stat cannot be in category '{0}' since this is reserved for a subcommand", category));
168 170
171 foreach (char c in DisallowedShortNameCharacters)
172 {
173 if (shortName.IndexOf(c) != -1)
174 throw new Exception(string.Format("Stat name {0} cannot contain character {1}", shortName, c));
175 }
176
169 ShortName = shortName; 177 ShortName = shortName;
170 Name = name; 178 Name = name;
171 Description = description; 179 Description = description;