Hi there, I was wondering if I could get some help with monitoring resource consumption in Cesium.
In my application, I’ll be using one CustomDataSource populated with several hundred entities. I’ll also have numerous BillboardCollections that contain billboard primitives, each with a canvas element as an image.
I plan to cap the use of each of these objects in order to ensure that the underlying WebGL resources NEVER run out, to ensure that a WebGL Context Loss does not occur. I will have complete control over the way the browser will be used for my customers, and I will constrain that usage to ensure that some unknown WebGL application does not consume resources.
So on startup, I’ll configure things such as MAX_NUM_ENTITIES and MAX_NUM_BILLBOARD_PRIMITIVES and so on. I’ll then implement application tier mechanisms to avoid exceeding those maximums.
Something I’m struggling with is measuring the consumption of resources in order to determine if resources are consumed steadily and over time. This, of course, could happen due to a leak in my code, or possibly a leak in Cesium. Alternatively it could be due to a bug in my code that is attempting to limit resource usage to the configured maximums.
Ultimately, the ability to continually measure resource consumption will ensure that I can detect such leaks or bugs at design time, or during product integration & test.
So my question is: what are the techniques that I can use to monitor resource consumption? I understand that I must monitor GPU resource consumption. I also must monitor memory consumption, and I’d like to monitor Cesium’s resource consumption as well. Does Cesium provide methods for querying for the critical resources associated with all of the objects I listed above?