When we used optimization, how to get the total number of optimizations use code?

 

When we used optimization, how to get the total number of optimizations use code?

Just like picture, how to get 9 number use code? 

 
bool  FrameNext(
   ulong&   pass,      // The number of a pass in the optimization, during which the frame has been added
   string&  name,      // Public name/label
   long&    id,        // Public ID
   double&  value      // Value
   );
 
Kang Feng #:

pass is not the total number of optimization.

 
William Roeder #:
You don't and don't need it.

Recently there is an idea that needs to use the total number of optimizations.

 

Before optimization: It is not possible to get the total number of optimizations in advance

Optimizations in progress/optimizations finished: Write your own counter using FrameNext() to get the total number of optimizations completed.

Reason: