class_docstr: Analyse historical data to optimize CorkDispatcher.
class_docstr_tok: ["Analyse","historical","data","to","optimize","CorkDispatcher","."]
code: def log_outbound(self, n: int, wait: float, duration: float):
      if self.outbound_counter <= self.N_SKIPPED_SAMPLE + 4:
          self.outbound_counter += 1
          # skip inaccurate info at beginning
          if self.outbound_counter <= self.N_SKIPPED_SAMPLE:
              return
  
      self.o_stat.append((n, duration, wait))
  
      if self._refresh_tb.consume(
          1, 1.0 / self.INTERVAL_REFRESH_PARAMS, 1
      ):
          self.trigger_refresh()
  
imports: from __future__ import annotations
  import asyncio
  import collections
  import functools
  import logging
  import time
  import traceback
  import typing
  from functools import cached_property
  import attr
  import numpy
  from ..utils.alg import TokenBucket
label_desc: Use image node_id 2 for calling the Optimizer obj's underlying member method code with example usage: obj.log_outbound(n, wait, duration) without return types