class_docstr: Class for generating metrics and printing it to stdout of the worker
class_docstr_tok: ["Class","for","generating","metrics","and","printing","it","to","stdout","of","the","worker"]
docstr: Constructor for CachingMetric
     CachingMetric reports collected metrics to stdout of worker
  
  Parameters
  ----------
  metric_name str
      Name of metric
  
  unit str
      unit can be one of ms, percent, count, MB, GB or a generic string
  
  dimension_names list
      list of dimension name strings
  
  metric_type MetricTypes
      Type of metric Counter, Gauge, Histogram
docstr_tok: ["Constructor","for","CachingMetric","CachingMetric","reports","collected","metrics","to","stdout","of","worker","Parameters","--","--","--","--","--","metric_name","str","Name","of","metric","unit","str","unit","can","be","one","of","ms",",","percent",",","count",",","MB",",","GB","or","a","generic","string","dimension_names","list","list","of","dimension","name","strings","metric_type","MetricTypes","Type","of","metric","Counter",",","Gauge",",","Histogram"]
code: def __init__(
      self,
      metric_name: str,
      unit: str,
      dimension_names: list = None,
      metric_type: MetricTypes = MetricTypes.COUNTER,
  ):
      """
      Constructor for CachingMetric
         CachingMetric reports collected metrics to stdout of worker
  
      Parameters
      ----------
      metric_name str
          Name of metric
  
      unit str
          unit can be one of ms, percent, count, MB, GB or a generic string
  
      dimension_names list
          list of dimension name strings
  
      metric_type MetricTypes
          Type of metric Counter, Gauge, Histogram
  
      """
      super().__init__(metric_name, unit, dimension_names, metric_type)
  
file_path: serve/ts/metrics/caching_metric.py
imports: import logging
  import socket
  import time
  from ts.metrics.dimension import Dimension
  from ts.metrics.metric_abstract import MetricAbstract
  from ts.metrics.metric_type_enum import MetricTypes
label_desc: Use image node_id 1 to create a new CachingMetric object from inherited base classes: MetricAbstract with example: obj = CachingMetric(metric_name, unit, dimension_names, metric_type)