File: percentile.py

package info (click to toggle)
python-kafka 2.0.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,740 kB
  • sloc: python: 20,457; makefile: 210; sh: 76
file content (15 lines) | stat: -rw-r--r-- 342 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import absolute_import


class Percentile(object):
    def __init__(self, metric_name, percentile):
        self._metric_name = metric_name
        self._percentile = float(percentile)

    @property
    def name(self):
        return self._metric_name

    @property
    def percentile(self):
        return self._percentile