anchor.diff:      Sink:gauge([Key, "atom_used"], erlang:memory(atom_used)),
       Sink:gauge([Key, "binary"], erlang:memory(binary)),
       Sink:gauge([Key, "ets"], erlang:memory(ets)).
  +
  +write_sched_time_stats(Sink, Key, #state{sched_time = enabled, prev_sched = PrevSched}) ->
  +    Sched = scheduler_wall_time(),
  +    [begin
  +        LSid = integer_to_list(Sid),
  +        Sink:timing([Key, LSid, ".active"], Active),
  +        Sink:timing([Key, LSid, ".total"], Total)
  +     end
  +     || {Sid, Active, Total} <- wall_time_diff(PrevSched, Sched)],
  +    Sched;
  +
  +write_sched_time_stats(_Sink, _Key, #state{prev_sched = PrevSched}) -> PrevSched.
  +
  +scheduler_wall_time() ->
  +    lists:sort(erlang:statistics(scheduler_wall_time)).
  
positive.code:     case {sched_time_available(), application:get_env(vmstats, sched_time)} of
          {true, {ok,true}} ->
              {ok, State#state{sched_time = enabled,
                               prev_sched = lists:sort(erlang:statistics(scheduler_wall_time))}};
          {true, _} ->
              {ok, State#state{sched_time = disabled}};
          {false, _} ->
  
negative.code:     {_, Reds} = erlang:statistics(reductions),
      Sink:increment([K,"reductions"], Reds),
  
      Sched = write_sched_time_stats(Sink, [K, "scheduler_wall_time."], S),
  
      Ref = erlang:start_timer(D, self(), ?TIMER_MSG),
      {noreply, S#state{timer_ref = Ref,
                        prev_sched = Sched,
                        prev_io = IO, prev_gc = GC}};
  handle_info(_Msg, {state, _Key, _TimerRef, _Delay}) ->
      exit(forced_upgrade_restart);
  handle_info(_Msg, {state, _Key, SchedTime, _PrevSched, _TimerRef, _Delay}) ->
  