MAJOR rework
- improves a lot on the Go side including better config and logging libraries (including log rotation), better internal package distribution, and new a3go functionality to make data transfer more performant - SQF side preprocessing of capture data is now minimal - arrays in hashmap format are sent directly to the extension and parsed there to minimize game impact - CBA custom events are implemented in a better fashion - README update - license change - with performance improvements, the deep customization of integrated metric gathering is removed in return to a single refreshRateMs, defining the interval at which core metrics are captured - peeled back the list of core metrics to the core information used in troubleshooting and benchmarking
This commit is contained in:
37
addons/main/fnc_callbackHandler.sqf
Normal file
37
addons/main/fnc_callbackHandler.sqf
Normal file
@@ -0,0 +1,37 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_function", "_data"];
|
||||
if !(_name == GVARMAIN(extensionName)) exitWith {};
|
||||
|
||||
// Validate data param
|
||||
if (isNil "_data") then {_data = ""};
|
||||
|
||||
if (_data isEqualTo "") exitWith {
|
||||
[
|
||||
"WARN",
|
||||
format ["Callback empty data: %1", _function]
|
||||
] call FUNC(log);
|
||||
false;
|
||||
};
|
||||
|
||||
private _dataArr = parseSimpleArray _data;
|
||||
if (
|
||||
(count _dataArr isEqualTo 0) &&
|
||||
(_function isNotEqualTo ":LOG:")
|
||||
) exitWith {
|
||||
[
|
||||
"WARN",
|
||||
format ["Callback invalid data for function %1: %2", _function, _data]
|
||||
] call FUNC(log);
|
||||
false;
|
||||
};
|
||||
|
||||
|
||||
switch (_function) do {
|
||||
case ":LOG:": {
|
||||
diag_log formatText ["[%1] %2", GVARMAIN(logPrefix), _dataArr#0];
|
||||
};
|
||||
default {
|
||||
["INFO", _data] call FUNC(log);
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user