From 9c392f6a6894d532917a3b4b44720fa1e6e30be7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 11 May 2012 02:05:32 +0100
Subject: Stagger multiple bot logins by 5 seconds to make this part of the
test more 'realistic'
TODO: Need to make this value configurable by a command line parameter to pCampbot
---
OpenSim/Tools/pCampBot/BotManager.cs | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 6d4bdb1..b9eabbf 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -49,6 +49,14 @@ namespace pCampBot
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
+ public const int DefaultLoginDelay = 5000;
+
+ ///
+ /// Delay between logins of multiple bots.
+ ///
+ /// TODO: This value needs to be configurable by a command line argument.
+ public int LoginDelay { get; set; }
+
///
/// Command console
///
@@ -84,6 +92,8 @@ namespace pCampBot
///
public BotManager()
{
+ LoginDelay = DefaultLoginDelay;
+
Rng = new Random(Environment.TickCount);
AssetsReceived = new Dictionary();
RegionsKnown = new Dictionary();
@@ -224,6 +234,9 @@ namespace pCampBot
pbThread.IsBackground = true;
pbThread.Start();
+
+ // Stagger logins
+ Thread.Sleep(LoginDelay);
}
///
--
cgit v1.1