mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-03-04 12:39:22 +00:00
Merge pull request #3865 from Sonicadvance1/telemetry_atexit
Telemetry: Change how visibility of telemetry values work
This commit is contained in:
commit
b8e864ffdf
@ -16,7 +16,7 @@
|
||||
|
||||
namespace FEXCore::Telemetry {
|
||||
#ifndef FEX_DISABLE_TELEMETRY
|
||||
static std::array<Value, FEXCore::Telemetry::TelemetryType::TYPE_LAST> TelemetryValues = {{}};
|
||||
std::array<Value, FEXCore::Telemetry::TelemetryType::TYPE_LAST> TelemetryValues = {{}};
|
||||
const std::array<std::string_view, FEXCore::Telemetry::TelemetryType::TYPE_LAST> TelemetryNames {
|
||||
"64byte Split Locks",
|
||||
"16byte Split atomics",
|
||||
@ -80,8 +80,5 @@ void Shutdown(const fextl::string& ApplicationName) {
|
||||
}
|
||||
}
|
||||
|
||||
Value& GetTelemetryValue(TelemetryType Type) {
|
||||
return TelemetryValues.at(Type);
|
||||
}
|
||||
#endif
|
||||
} // namespace FEXCore::Telemetry
|
||||
|
@ -4,10 +4,9 @@
|
||||
#include <FEXCore/Utils/CompilerDefs.h>
|
||||
#include <FEXCore/fextl/string.h>
|
||||
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <stdint.h>
|
||||
#include <type_traits>
|
||||
#include <filesystem>
|
||||
|
||||
namespace FEXCore::Telemetry {
|
||||
enum TelemetryType {
|
||||
@ -64,7 +63,10 @@ private:
|
||||
std::atomic<uint64_t> Data;
|
||||
};
|
||||
|
||||
FEX_DEFAULT_VISIBILITY Value& GetTelemetryValue(TelemetryType Type);
|
||||
FEX_DEFAULT_VISIBILITY extern std::array<Value, FEXCore::Telemetry::TelemetryType::TYPE_LAST> TelemetryValues;
|
||||
inline Value& GetTelemetryValue(TelemetryType Type) {
|
||||
return FEXCore::Telemetry::TelemetryValues[Type];
|
||||
}
|
||||
|
||||
FEX_DEFAULT_VISIBILITY void Initialize();
|
||||
FEX_DEFAULT_VISIBILITY void Shutdown(const fextl::string& ApplicationName);
|
||||
|
Loading…
x
Reference in New Issue
Block a user