Add optional total avatars, total prims and active prims stats to ODE plugin.
These will act as a sanity check with the main scene stats, to show that physics scene entities are being managed properly. Total prims will not match scene total prims since physics total does not include phantom prims0.7.3-extended
parent
93e053a122
commit
27c62bba99
|
@ -142,6 +142,21 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
/// </summary>
|
||||
private Dictionary<string, float> m_stats = new Dictionary<string, float>();
|
||||
|
||||
/// <summary>
|
||||
/// Stat name for total number of avatars in this ODE scene.
|
||||
/// </summary>
|
||||
public const string ODETotalAvatarsStatName = "ODETotalAvatars";
|
||||
|
||||
/// <summary>
|
||||
/// Stat name for total number of prims in this ODE scene.
|
||||
/// </summary>
|
||||
public const string ODETotalPrimsStatName = "ODETotalPrims";
|
||||
|
||||
/// <summary>
|
||||
/// Stat name for total number of prims with active physics in this ODE scene.
|
||||
/// </summary>
|
||||
public const string ODEActivePrimsStatName = "ODEActivePrims";
|
||||
|
||||
/// <summary>
|
||||
/// Stat name for the total time spent in ODE frame processing.
|
||||
/// </summary>
|
||||
|
@ -4220,6 +4235,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
returnStats = new Dictionary<string, float>(m_stats);
|
||||
|
||||
// FIXME: This is a SUPER DUMB HACK until we can establish stats that aren't subject to a division by
|
||||
// 3 from the SimStatsReporter.
|
||||
returnStats[ODETotalAvatarsStatName] = _characters.Count * 3;
|
||||
returnStats[ODETotalPrimsStatName] = _prims.Count * 3;
|
||||
returnStats[ODEActivePrimsStatName] = _activeprims.Count * 3;
|
||||
|
||||
InitializeExtraStats();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue