From 210868a832439bb226dfcf153ca66563300dc2cf Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 31 Oct 2011 23:10:10 +0000
Subject: Remove OpenSim.TestSuite
Hasn't been touched since 2009 and wasn't more than another copy of pCampBot
---
OpenSim/Tools/pCampBot/BotManager.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index 0aaa226..a4b7f16 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -165,18 +165,20 @@ namespace pCampBot
///
///
///
- public void handlebotEvent(PhysicsBot callbot, EventType eventt)
+ private void handlebotEvent(PhysicsBot callbot, EventType eventt)
{
switch (eventt)
{
case EventType.CONNECTED:
m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected");
numbots++;
+// m_log.InfoFormat("NUMBOTS {0}", numbots);
break;
case EventType.DISCONNECTED:
m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected");
m_td[m_lBot.IndexOf(callbot)].Abort();
numbots--;
+// m_log.InfoFormat("NUMBOTS {0}", numbots);
if (numbots <= 0)
Environment.Exit(0);
break;
--
cgit v1.1
From b951c7fb1e5a284a9bf95054cb168e64ebfe717d Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 31 Oct 2011 23:22:55 +0000
Subject: Make bots share a cache so that asset downloads attempts are only
made once instead of once for each bot
---
OpenSim/Tools/pCampBot/BotManager.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
(limited to 'OpenSim/Tools/pCampBot/BotManager.cs')
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs
index a4b7f16..03bb820 100644
--- a/OpenSim/Tools/pCampBot/BotManager.cs
+++ b/OpenSim/Tools/pCampBot/BotManager.cs
@@ -53,13 +53,20 @@ namespace pCampBot
protected bool m_verbose = true;
protected Random somthing = new Random(Environment.TickCount);
protected int numbots = 0;
- private IConfig Config;
+ public IConfig Config { get; private set; }
+
+ ///
+ /// Track the assets we have and have not received so we don't endlessly repeat requests.
+ ///
+ public Dictionary AssetsReceived { get; private set; }
///
/// Constructor Creates MainConsole.Instance to take commands and provide the place to write data
///
public BotManager()
{
+ AssetsReceived = new Dictionary();
+
m_console = CreateConsole();
MainConsole.Instance = m_console;
@@ -113,7 +120,7 @@ namespace pCampBot
for (int i = 0; i < botcount; i++)
{
string lastName = string.Format("{0}_{1}", lastNameStem, i);
- startupBot(i, cs, firstName, lastName, password, loginUri);
+ startupBot(i, this, firstName, lastName, password, loginUri);
}
}
@@ -146,9 +153,9 @@ namespace pCampBot
/// Last name
/// Password
/// Login URI
- public void startupBot(int pos, IConfig cs, string firstName, string lastName, string password, string loginUri)
+ public void startupBot(int pos, BotManager bm, string firstName, string lastName, string password, string loginUri)
{
- PhysicsBot pb = new PhysicsBot(cs, firstName, lastName, password, loginUri);
+ PhysicsBot pb = new PhysicsBot(bm, firstName, lastName, password, loginUri);
pb.OnConnected += handlebotEvent;
pb.OnDisconnected += handlebotEvent;
--
cgit v1.1