Defined in File Telemetry.h
private flamegpu::detail::TestSuiteTelemetry(Class TestSuiteTelemetry)
Class for interacting with the telemetry, using static methods. This is a class rather than a namespace to prevent users from directly calling some methods which must be accessible from CUDASimulation and CUDAEnsemble.
Subclassed by flamegpu::detail::TestSuiteTelemetry
Public Static Functions
static void enable()
Opt-in to sending anonymous usage telemetry information, if currently disabled. This controls the default value used for CUDASimulation and CUDAEnsemble configuration objects, which can then independently be opted out.
static void disable()
Opt-out of sending anonymous usage telemetry information, if currently enabled. This controls the default value used for CUDASimulation and CUDAEnsemble configuration objects, which can then independently be opted out.
static bool isEnabled()
Get the current enabled/disabled status of telemetry. If the system environment variable FLAMEGPU_SHARE_USAGE_STATISTICS is defined, and is false-y (0, false, False, FALSE, off, Off, OFF) it will be disabled by default. Otherwise, the CMake FLAMEGPU_SHARE_USAGE_STATISTICS option will be used, which defaults to On/True. Otherwise, if the define was not specified at build time, it will default to enabled.
if telemetry is currently enabled or disabled.
static void suppressNotice()
If telemetry is not enabled, a notice will be emitted to encourage users to enable this as a way to support FLAMEGPU development, once per application run. This method can be called to disable that message from being printed. I.e. this is used within the test suite(s).
Protected Static Functions
static std::string generateData(std::string event_name, std::map<std::string, std::string> payload_items, bool isSWIG)
Generates the telemetry data packet as a string. Function is used by sendTelemetryData but is useful for returning the actual json for transparency. See documentation for data which is sent and why
event_name – the name of the event to record. This will either be “simulation-run, ensemble-run”
payload_items – a map of key value items to embed in the payload of the telemetry packet
isSWIG – True if a swig build of flamegpu
The json string that should be sent via sendTelemetryData
static bool sendData(std::string telemetry_data)
Sends telemetry data in the form as the provided json to the TelemetryDeck web service.
telemetry_data – json data to send
false if failed for any reason (including inability to reach host)
static void encourageUsage()
Prints a notice that telemetry is helpful to the development of the software. Notice will not be printed if telemetry is disabled, and the notice has not been suppressed.
static bool isTestMode()
Get the current test mode status of telemetry, which will be false unless the system environment variable FLAMEGPU_TELEMETRY_TEST_MODE is defined and not a false-y value, or if the CMake option FLAMEGPU_TELEMETRY_TEST_MODE was set to ON. Otherwise, if the define was not specified at build time, it will default to enabled.
if telemetry is currently in test mode or not.
Protected Static Attributes
static constexpr char TELEMETRY_ENDPOINT = "https://nom.telemetrydeck.com/v1/"
- friend class flamegpu::CUDASimulation
- friend class flamegpu::CUDAEnsemble
- static void enable()