Compartir a través de


IScheduler::Statistics Method

Provides information related to task arrival and completion rates, and change in queue length for a scheduler.

virtual void Statistics(
   _Out_ unsigned int * pTaskCompletionRate,
   _Out_ unsigned int * pTaskArrivalRate,
   _Out_ unsigned int * pNumberOfTasksEnqueued
) =0;

Parameters

  • pTaskCompletionRate
    The number of tasks that have been completed by the scheduler since the last call to this method.

  • pTaskArrivalRate
    The number of tasks that have arrived in the scheduler since the last call to this method.

  • pNumberOfTasksEnqueued
    The total number of tasks in all scheduler queues.

Remarks

This method is invoked by the Resource Manager in order to gather statistics for a scheduler. The statistics gathered here will be used to drive dynamic feedback algorithms to determine when it is appropriate to assign more resources to the scheduler and when to take resources away. The values provided by the scheduler can be optimistic and do not necessarily have to reflect the current count accurately.

You should implement this method if you want the Resource Manager to use feedback about such things as task arrival to determine how to balance resource between your scheduler and other schedulers registered with the Resource Manager. If you choose not to gather statistics, you can set the policy key DynamicProgressFeedback to the value DynamicProgressFeedbackDisabled in your scheduler's policy, and the Resource Manager will not invoke this method on your scheduler.

In the absence of statistical information, the Resource Manager will use hardware thread subscription levels to make resource allocation and migration decisions. For more information on subscription levels, see IExecutionResource::CurrentSubscriptionLevel.

Requirements

Header: concrtrm.h

Namespace: concurrency

See Also

Reference

IScheduler Structure

PolicyElementKey Enumeration

IExecutionResource::CurrentSubscriptionLevel Method