Design recording arbitrary profiling data
mickvangelderen opened this issue · comments
I want to be able to record cpu/gpu timespans (begin, end), single values (active cluster count), histograms (fragments per cluster).
Also, the scopes are statically determined. Could leverage that. The number of samples/scope are dynamic though.
Should I associate a sample kind with a sample index? Do I have several buffers for each sample kind?
I think I'm going to have the application do a copy to a profiling context managed rotated buffer. This introduces additional copies but otherwise we would have to manage rotated dynamic resources ourselves in the main application, which is too large a change. Efficiency is also irrelevant because these metrics will only be recorded during the first run where time doesn't matter.