Since we already collect a lot of runtime information (RAM-, CPU-, GPU-, VRAM-, usage, …) it would be a great feature if we could allow people to poll this data during runtime, e.g., to display hardware utilization.
So far I thought about two different avenues to implement this:
- Polling: We provide a function such as
tirexError tirexHandlePollMeasure(tirexMeasureHandle*, tirexMeasure, tirexResultEntry*) with which a user may poll the current value.
- Observers: We provide functions
tirexError tirexHandleObserverAdd(tirexMeasureHandle*, tirexMeasure, void(*)(void*, tirexResultEntry*), void*) and tirexError tirexHandleObserverRemove(tirexMeasureHandle*, tirexMeasure, void(*)(void*, tirexResultEntry*)) for registering and removing observers that get notified on every change.
I prefer the polling since I believe that observers add too much overhead and complexity (e.g., that the user had to handle the lifetime of the userdata that can optionally be passed to the observer callback).
Since we already collect a lot of runtime information (RAM-, CPU-, GPU-, VRAM-, usage, …) it would be a great feature if we could allow people to poll this data during runtime, e.g., to display hardware utilization.
So far I thought about two different avenues to implement this:
tirexError tirexHandlePollMeasure(tirexMeasureHandle*, tirexMeasure, tirexResultEntry*)with which a user may poll the current value.tirexError tirexHandleObserverAdd(tirexMeasureHandle*, tirexMeasure, void(*)(void*, tirexResultEntry*), void*)andtirexError tirexHandleObserverRemove(tirexMeasureHandle*, tirexMeasure, void(*)(void*, tirexResultEntry*))for registering and removing observers that get notified on every change.I prefer the polling since I believe that observers add too much overhead and complexity (e.g., that the user had to handle the lifetime of the userdata that can optionally be passed to the observer callback).