adjust to include worldName/serverName as tag values, missionName field
This commit is contained in:
@@ -7,46 +7,34 @@ _args params [["_cba",false,[true]]];
|
||||
if(missionNamespace getVariable ["RangerMetrics_run",false]) then {
|
||||
private _startTime = diag_tickTime;
|
||||
|
||||
// Mission Name
|
||||
// private _missionName = missionName;
|
||||
// ["missionName", _missionName] call RangerMetrics_fnc_send;
|
||||
|
||||
// World Name
|
||||
// private _worldName = worldName;
|
||||
// ["worldName", _worldName] call RangerMetrics_fnc_send;
|
||||
|
||||
// Server Name
|
||||
// private _serverName = serverName;
|
||||
// ["serverName", _serverName] call RangerMetrics_fnc_send;
|
||||
|
||||
// Number of local units
|
||||
["count.units", { local _x } count allUnits] call RangerMetrics_fnc_send;
|
||||
["count.groups", { local _x } count allGroups] call RangerMetrics_fnc_send;
|
||||
["count.vehicles", { local _x} count vehicles] call RangerMetrics_fnc_send;
|
||||
["count.units", "int", { local _x } count allUnits] call RangerMetrics_fnc_send;
|
||||
["count.groups", "int", { local _x } count allGroups] call RangerMetrics_fnc_send;
|
||||
["count.vehicles", "int", { local _x} count vehicles] call RangerMetrics_fnc_send;
|
||||
|
||||
// Server Stats
|
||||
["stats.fps", round diag_fps] call RangerMetrics_fnc_send;
|
||||
["stats.fpsMin", round diag_fpsMin] call RangerMetrics_fnc_send;
|
||||
["stats.uptime", round diag_tickTime] call RangerMetrics_fnc_send;
|
||||
["stats.missionTime", round time] call RangerMetrics_fnc_send;
|
||||
["stats.fps", "float", diag_fps toFixed 2] call RangerMetrics_fnc_send;
|
||||
["stats.fpsMin", "float", diag_fpsMin toFixed 2] call RangerMetrics_fnc_send;
|
||||
["stats.uptime", "float", diag_tickTime toFixed 2] call RangerMetrics_fnc_send;
|
||||
["stats.missionTime", "float", time toFixed 2] call RangerMetrics_fnc_send;
|
||||
|
||||
// Scripts
|
||||
private _activeScripts = diag_activeScripts;
|
||||
["scripts.spawn", _activeScripts select 0] call RangerMetrics_fnc_send;
|
||||
["scripts.execVM", _activeScripts select 1] call RangerMetrics_fnc_send;
|
||||
["scripts.exec", _activeScripts select 2] call RangerMetrics_fnc_send;
|
||||
["scripts.execFSM", _activeScripts select 3] call RangerMetrics_fnc_send;
|
||||
["scripts.spawn", "int", _activeScripts select 0] call RangerMetrics_fnc_send;
|
||||
["scripts.execVM", "int", _activeScripts select 1] call RangerMetrics_fnc_send;
|
||||
["scripts.exec", "int", _activeScripts select 2] call RangerMetrics_fnc_send;
|
||||
["scripts.execFSM", "int", _activeScripts select 3] call RangerMetrics_fnc_send;
|
||||
|
||||
private _pfhCount = if(_cba) then {count CBA_common_perFrameHandlerArray} else {0};
|
||||
["scripts.pfh", _pfhCount] call RangerMetrics_fnc_send;
|
||||
["scripts.pfh", "int", _pfhCount] call RangerMetrics_fnc_send;
|
||||
|
||||
// Globals if server
|
||||
if (isServer) then {
|
||||
// Number of local units
|
||||
["count.units", count allUnits, true] call RangerMetrics_fnc_send;
|
||||
["count.groups", count allGroups, true] call RangerMetrics_fnc_send;
|
||||
["count.vehicles", count vehicles, true] call RangerMetrics_fnc_send;
|
||||
["count.players", count allPlayers, true] call RangerMetrics_fnc_send;
|
||||
["count.units", "float", count allUnits, true] call RangerMetrics_fnc_send;
|
||||
["count.groups", "float", count allGroups, true] call RangerMetrics_fnc_send;
|
||||
["count.vehicles", "float", count vehicles, true] call RangerMetrics_fnc_send;
|
||||
["count.players", "float", count allPlayers, true] call RangerMetrics_fnc_send;
|
||||
};
|
||||
|
||||
|
||||
@@ -59,7 +47,7 @@ if(missionNamespace getVariable ["RangerMetrics_run",false]) then {
|
||||
{
|
||||
{
|
||||
private _stats_fps = round diag_fps;
|
||||
["stats.HCfps", _stats_fps] remoteExec ["RangerMetrics_fnc_send", 2];
|
||||
["stats.HCfps", "float", _stats_fps] remoteExec ["RangerMetrics_fnc_send", 2];
|
||||
|
||||
} remoteExecCall ["bis_fnc_call", owner _x];
|
||||
} foreach _headlessClients;
|
||||
|
||||
@@ -3,7 +3,21 @@ params ["_metric", "_value", ["_global", false]];
|
||||
private _profileName = profileName;
|
||||
private _prefix = "Arma3";
|
||||
|
||||
private _metricPath = [format["%1,%2", _profileName, profileName], format["%1,%2", _profileName, "global"]] select _global;
|
||||
|
||||
private _environmentMeta = [missionName, worldName, serverName];
|
||||
|
||||
private _metricPath = [
|
||||
format["%1,%2,%3,%4,%5",
|
||||
_profileName,
|
||||
profileName,
|
||||
missionName, worldName, serverName
|
||||
],
|
||||
format["%1,%2,%3,%4,%5",
|
||||
_profileName,
|
||||
"global",
|
||||
missionName, worldName, serverName
|
||||
]
|
||||
] select _global;
|
||||
|
||||
// InfluDB settings
|
||||
private _connection = "http://INFLUX_URL:8086";
|
||||
@@ -18,7 +32,7 @@ if(missionNamespace getVariable ["RangerMetrics_debug",false]) then {
|
||||
};
|
||||
|
||||
// send the data
|
||||
private _return = "a3influx" callExtension _extSend;
|
||||
private _return = "RangerMetrics" callExtension _extSend;
|
||||
|
||||
// shouldn't be possible, the extension should always return even if error
|
||||
if(isNil "_return") exitWith {
|
||||
|
||||
Reference in New Issue
Block a user