aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tools/pCampBot
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-11 02:05:32 +0100
committerJustin Clark-Casey (justincc)2012-05-11 02:05:32 +0100
commit9c392f6a6894d532917a3b4b44720fa1e6e30be7 (patch)
treededb4d839be01aa544d9283978230df89a7fd983 /OpenSim/Tools/pCampBot
parentDo bot startup on another thread so console is responsive during this process (diff)
downloadopensim-SC_OLD-9c392f6a6894d532917a3b4b44720fa1e6e30be7.zip
opensim-SC_OLD-9c392f6a6894d532917a3b4b44720fa1e6e30be7.tar.gz
opensim-SC_OLD-9c392f6a6894d532917a3b4b44720fa1e6e30be7.tar.bz2
opensim-SC_OLD-9c392f6a6894d532917a3b4b44720fa1e6e30be7.tar.xz
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
Diffstat (limited to 'OpenSim/Tools/pCampBot')
-rw-r--r--OpenSim/Tools/pCampBot/BotManager.cs13
1 files changed, 13 insertions, 0 deletions
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
49 { 49 {
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 public const int DefaultLoginDelay = 5000;
53
54 /// <summary>
55 /// Delay between logins of multiple bots.
56 /// </summary>
57 /// <remarks>TODO: This value needs to be configurable by a command line argument.</remarks>
58 public int LoginDelay { get; set; }
59
52 /// <summary> 60 /// <summary>
53 /// Command console 61 /// Command console
54 /// </summary> 62 /// </summary>
@@ -84,6 +92,8 @@ namespace pCampBot
84 /// </summary> 92 /// </summary>
85 public BotManager() 93 public BotManager()
86 { 94 {
95 LoginDelay = DefaultLoginDelay;
96
87 Rng = new Random(Environment.TickCount); 97 Rng = new Random(Environment.TickCount);
88 AssetsReceived = new Dictionary<UUID, bool>(); 98 AssetsReceived = new Dictionary<UUID, bool>();
89 RegionsKnown = new Dictionary<ulong, GridRegion>(); 99 RegionsKnown = new Dictionary<ulong, GridRegion>();
@@ -224,6 +234,9 @@ namespace pCampBot
224 pbThread.IsBackground = true; 234 pbThread.IsBackground = true;
225 235
226 pbThread.Start(); 236 pbThread.Start();
237
238 // Stagger logins
239 Thread.Sleep(LoginDelay);
227 } 240 }
228 241
229 /// <summary> 242 /// <summary>