Is the default
stats command for computing avg,min,max and sdev a custom search command which calls the rawstats.py file?
I have disabled the rawstats command for my search app, but I am available to run the stats command.
Am I missing something or is my understanding wrong?
stats command is a builtin.
rawstats is the command that uses
[rawstats] filename = rawstats.py streaming = true retainsevents = true overrides_timeorder = false
so dart . if i define my additional functionality to this piece of code in rawstats.py file
"""returns the median, average, standard deviation, min and max of a sequence"""
tot = sum(r)
avg = tot/len(r)
sdsq = sum([(i-avg)**2 for i in r]) s = list(r) s.sort() return s[len(s)//2], avg, (sdsq/(len(r)-1 or 1))**.5, min(r), max(r)
and save it as seperate command .. will that work ??