HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.  2.0.0-chaika
Hierarchical Cluster Engine Python language binding
algorithms.MetricTagsCount.MetricTagsCount Class Reference
Inheritance diagram for algorithms.MetricTagsCount.MetricTagsCount:
Collaboration diagram for algorithms.MetricTagsCount.MetricTagsCount:

Public Member Functions

def __init__ (self, names)
 
def precalculate (self, result, metricName)
 
- Public Member Functions inherited from algorithms.BaseMetric.BaseMetric
def __init__ (self, names)
 
def retForMultiNames (self, retDict, metricName)
 
def sortElementsByMetric (self, elements, metricName)
 
def selectElementsByMetric (self, elements, metricName, metricLimitMax, metricLimitMin)
 

Additional Inherited Members

- Public Attributes inherited from algorithms.BaseMetric.BaseMetric
 names
 

Detailed Description

Definition at line 25 of file MetricTagsCount.py.

Constructor & Destructor Documentation

◆ __init__()

def algorithms.MetricTagsCount.MetricTagsCount.__init__ (   self,
  names 
)

Definition at line 31 of file MetricTagsCount.py.

31  def __init__(self, names):
32  super(MetricTagsCount, self).__init__(names)
33 
34 
def __init__(self)
constructor
Definition: UIDGenerator.py:19

Member Function Documentation

◆ precalculate()

def algorithms.MetricTagsCount.MetricTagsCount.precalculate (   self,
  result,
  metricName 
)

Definition at line 39 of file MetricTagsCount.py.

39  def precalculate(self, result, metricName):
40  ret = {"count": 0, "percent": 0}
41  for key in result.tags:
42  if result.isTagFilled(key):
43  ret["count"] += 1
44  if len(result.tags) > 0:
45  ret["percent"] = ret["count"] * 100 / len(result.tags)
46  ret = self.retForMultiNames(ret, metricName)
47  return ret
48 
Here is the call graph for this function:

The documentation for this class was generated from the following file: