
  -spec statistics(microstate_accounting) -> [MSAcc_Thread] | undefined
                      when
                          MSAcc_Thread ::
                              #{type := MSAcc_Thread_Type,
                                id := MSAcc_Thread_Id,
                                counters := MSAcc_Counters},
                          MSAcc_Thread_Type ::
                              async | aux | dirty_io_scheduler |
                              dirty_cpu_scheduler | poll | scheduler,
                          MSAcc_Thread_Id :: non_neg_integer(),
                          MSAcc_Counters ::
                              #{MSAcc_Thread_State => non_neg_integer()},
                          MSAcc_Thread_State ::
                              alloc | aux | bif | busy_wait | check_io |
                              emulator | ets | gc | gc_fullsweep | nif |
                              other | port | send | sleep | timers.

Since:
  OTP 19.0

  -spec statistics(io) -> {{input, Input}, {output, Output}}
                      when
                          Input :: non_neg_integer(),
                          Output :: non_neg_integer().

  -spec statistics(active_tasks_all) -> [ActiveTasks]
                      when ActiveTasks :: non_neg_integer().

Since:
  OTP 20.0

  -spec statistics(run_queue_lengths_all) -> [RunQueueLength]
                      when RunQueueLength :: non_neg_integer().

Since:
  OTP 20.0

  -spec statistics(garbage_collection) ->
                      {Number_of_GCs, Words_Reclaimed, 0}
                      when
                          Number_of_GCs :: non_neg_integer(),
                          Words_Reclaimed :: non_neg_integer().

  -spec statistics(reductions) ->
                      {Total_Reductions, Reductions_Since_Last_Call}
                      when
                          Total_Reductions :: non_neg_integer(),
                          Reductions_Since_Last_Call :: non_neg_integer().

  -spec statistics(runtime) -> {Total_Run_Time, Time_Since_Last_Call}
                      when
                          Total_Run_Time :: non_neg_integer(),
                          Time_Since_Last_Call :: non_neg_integer().

  -spec statistics(wall_clock) ->
                      {Total_Wallclock_Time,
                       Wallclock_Time_Since_Last_Call}
                      when
                          Total_Wallclock_Time :: non_neg_integer(),
                          Wallclock_Time_Since_Last_Call ::
                              non_neg_integer().

  -spec statistics(scheduler_wall_time) ->
                      [{SchedulerId, ActiveTime, TotalTime}] | undefined
                      when
                          SchedulerId :: pos_integer(),
                          ActiveTime :: non_neg_integer(),
                          TotalTime :: non_neg_integer().

Since:
  OTP R15B01

  -spec statistics(exact_reductions) ->
                      {Total_Exact_Reductions,
                       Exact_Reductions_Since_Last_Call}
                      when
                          Total_Exact_Reductions :: non_neg_integer(),
                          Exact_Reductions_Since_Last_Call ::
                              non_neg_integer().

  -spec statistics(active_tasks) -> [ActiveTasks]
                      when ActiveTasks :: non_neg_integer().

Since:
  OTP 18.3

  -spec statistics(run_queue_lengths) -> [RunQueueLength]
                      when RunQueueLength :: non_neg_integer().

Since:
  OTP 18.3

  -spec statistics(run_queue) -> non_neg_integer().

  -spec statistics(context_switches) -> {ContextSwitches, 0}
                      when ContextSwitches :: non_neg_integer().

  -spec statistics(scheduler_wall_time_all) ->
                      [{SchedulerId, ActiveTime, TotalTime}] | undefined
                      when
                          SchedulerId :: pos_integer(),
                          ActiveTime :: non_neg_integer(),
                          TotalTime :: non_neg_integer().

Since:
  OTP 20.0

  -spec statistics(total_active_tasks) -> ActiveTasks
                      when ActiveTasks :: non_neg_integer().

Since:
  OTP 18.3

  -spec statistics(total_active_tasks_all) -> ActiveTasks
                      when ActiveTasks :: non_neg_integer().

Since:
  OTP 20.0

  -spec statistics(total_run_queue_lengths) -> TotalRunQueueLengths
                      when TotalRunQueueLengths :: non_neg_integer().

Since:
  OTP 18.3

  -spec statistics(total_run_queue_lengths_all) -> TotalRunQueueLengths
                      when TotalRunQueueLengths :: non_neg_integer().

Since:
  OTP 20.0

  The same as calling lists:sum(statistics(run_queue_lengths_all)),
  but more efficient.
