* integrate(lsl): OpenSim/Framework/OglRenderMaterialFaces.cs * integrate(lsl): OpenSim/Framework/OpenSim.Framework.csproj * integrate(lsl): OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs * integrate(lsl): OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs * integrate(lsl): OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs * integrate(lsl): doc/OpenGenesisLINK/G1_SL_RENDER_MATERIAL_LSL.md * integrate(lsl): tools/ci/OglRenderMaterialLslRegression/OglRenderMaterialLslRegression.csproj * integrate(lsl): tools/ci/OglRenderMaterialLslRegression/Program.cs * integrate(warp3d): OpenSim/Region/CoreModules/World/Warp3DMap/Warp3DImageModule.cs * integrate(warp3d): bin/OpenSim.ini * integrate(warp3d): bin/OpenSim.ini.example * integrate(warp3d): bin/OpenSimDefaults.ini * integrate(warp3d): doc/OpenGenesisLINK/G1_WARP3D_GC_MAP_PERF.md * integrate(warp3d): tools/ci/verify_ogl_warp3d_lifecycle.py * integrate(nodeagent): NexVerse/RegionModules/NodeAgent/NexVerseNodeAgentModule.cs * integrate(nodeagent): tools/ci/verify_ogl_performance_sources.py * integrate(nodeagent): NexVerse/RegionModules/NodeAgent/OglNodePerformanceHeartbeat.cs * integrate(nodeagent): doc/OpenGenesisLINK/G1_NODEAGENT_PERFORMANCE_REFACTOR.md * integrate(nodeagent): tools/ci/verify_ogl_node_performance_refactor.py * integrate(worldapi): NexVerse/Server/Api/NexApiDocsPage.cs * integrate(worldapi): tools/ci/verify_ogl_api_adminlte_viewers.py * integrate(worldapi): NexVerse/Server/Api/NexApiDocsStyles.cs * integrate(worldapi): doc/OpenGenesisLINK/G1_CONTROL_CENTER_CSS_MODULE.md * ci(closeout): gate all four functional and architecture changes on Linux .NET10 * ci(closeout): combine feature-specific NexVerse tests without dropping existing gates * test(closeout): gate combined data, LSL, performance and architecture contracts * ci(closeout): validate combined G1 feature graph before runtime smoke * docs(closeout): integrated acceptance and safe staging rollout checklist * test(worldapi): inspect extracted theme directly in protected docs security gate * test(worldapi): verify aurora theme in extracted styles instead of HTML source * test(worldapi): validate dashboard animations in extracted stylesheet
65 lines
2.6 KiB
C#
65 lines
2.6 KiB
C#
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using System.Linq;
|
|
using NexVerse.Core.Observability;
|
|
using OpenSim.Framework;
|
|
using OpenSim.Region.Framework.Interfaces;
|
|
using OpenSim.Region.Framework.Scenes;
|
|
|
|
namespace NexVerse.RegionModules.NodeAgent
|
|
{
|
|
/// <summary>
|
|
/// Read-only NodeAgent performance heartbeat projection. It is deliberately
|
|
/// independent of NexBus transports, credentials, update control and
|
|
/// region mutation; the caller signs the resulting heartbeat as before.
|
|
/// </summary>
|
|
internal static class OglNodePerformanceHeartbeat
|
|
{
|
|
public static void Append(Scene[] scenes, OglPerformanceSampler sampler,
|
|
IDictionary<string, string> destination)
|
|
{
|
|
if (scenes is null || sampler is null || destination is null)
|
|
return;
|
|
|
|
OglRegionFrame[] frames = scenes
|
|
.OrderBy(scene => scene.RegionInfo.RegionID.ToString(), StringComparer.Ordinal)
|
|
.Select(scene =>
|
|
{
|
|
// Drain each per-region timing window at most once per
|
|
// signed heartbeat, never on the frame hot path.
|
|
OglRegionTimingSample? sample =
|
|
scene.OglPerformanceTiming?.TakeSnapshotAndReset();
|
|
|
|
return new OglRegionFrame(
|
|
scene.RegionInfo.RegionID.ToString(), scene.Frame, scene.FrameTime,
|
|
sample?.Frames ?? 0,
|
|
sample?.WorkAverageMs ?? 0,
|
|
sample?.FrameAverageMs ?? 0,
|
|
sample?.WorkP95Ms ?? 0,
|
|
sample?.FrameP95Ms ?? 0,
|
|
sample?.FrameP99Ms ?? 0,
|
|
sample?.WorkOverBudgetPercent ?? 0,
|
|
sample?.FrameOverBudgetPercent ?? 0);
|
|
})
|
|
.ToArray();
|
|
|
|
foreach (KeyValuePair<string, string> metric in sampler.Capture(frames))
|
|
destination[metric.Key] = metric.Value;
|
|
|
|
// Discover the active shared cache only through the public
|
|
// optional interface, not concrete Flotsam implementation.
|
|
if (scenes.Length > 0 &&
|
|
scenes[0].RequestModuleInterface<IAssetCache>()
|
|
is IOglAssetCacheMetricsProvider provider)
|
|
{
|
|
foreach (KeyValuePair<string, long> metric in provider.CaptureAssetCacheMetrics())
|
|
destination[metric.Key] =
|
|
metric.Value.ToString(CultureInfo.InvariantCulture);
|
|
}
|
|
}
|
|
}
|
|
}
|