I am still confused about why we need to have multiple substats. In the current code base the SUBSET group ends up holding exactly the same data as the TOTAL group (i.e. Profile::sample_point() samples both substat groups and it's the only public method to sample points).
In case such functionality is indeed needed, I believe that it could be achieved more cleanly by using multiple Profiler instances to hold different data sets.
I am still confused about why we need to have multiple substats. In the current code base the SUBSET group ends up holding exactly the same data as the TOTAL group (i.e. Profile: :sample_ point() samples both substat groups and it's the only public method to sample points).
In case such functionality is indeed needed, I believe that it could be achieved more cleanly by using multiple Profiler instances to hold different data sets.