Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question concerning real value of PmfStat #41

Open
dannyOhNo opened this issue Mar 29, 2016 · 0 comments
Open

Question concerning real value of PmfStat #41

dannyOhNo opened this issue Mar 29, 2016 · 0 comments

Comments

@dannyOhNo
Copy link

via src/greplin/scales/__init__.py

def addValue(self, value):
    """Updates the dictionary."""
    self['count'] += 1
    self.__sample.update(value)
    if time.time() > self.__timestamp + 20 and len(self.__sample) > 1:
      self.__timestamp = time.time()
      self['min'] = self.__sample.min
      self['max'] = self.__sample.max
      self['mean'] = self.__sample.mean
      self['stddev'] = self.__sample.stddev

      percentiles = self.__sample.percentiles([0.5, 0.75, 0.95, 0.98, 0.99, 0.999])
      self['median'] = percentiles[0]
      self['75percentile'] = percentiles[1]
      self['95percentile'] = percentiles[2]
      self['98percentile'] = percentiles[3]
      self['99percentile'] = percentiles[4]
      self.percentile99 = percentiles[4]
      self['999percentile'] = percentiles[5]

Several stats about the current metric are saved. However, it doesn't appear that the raw value is being preserved. Is this correct? If so, what is the reason this value isn't being preserved?

Inserting self['value'] = value in the above statement worked locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant