archiver-appliance / epicsarchiverap

This is an implementation of an archiver for EPICS control systems that aims to archive millions of PVs.
Other
38 stars 37 forks source link

Add number of samples to MetaInfo #124

Closed slacmshankar closed 2 years ago

slacmshankar commented 2 years ago

When looking at the Python module that defines policy, I can see the following function:

def determinePolicy(pv_info): """Return the policy to apply for the given PV

pv_info is a dict with the information computed by the engine about the PV.
It includes:
    - dbrtype -- The ArchDBRType of the PV
    - eventRate -- The sampled event rate in events per second.
    - storageRate -- The sampled storage in bytes per seconds.
    - aliasName -- The value of the .NAME field for aliases
    - policyName -- If the user has overridden the policy when requesting archiving, this is the name of the policy

The Python dictionary "pv_info" has several keys but none of them tells the programmer what is the number of data points of the PV to be archived. Do you know if such a key (of the dictionary) exists or should we just calculate/extrapolate this number based on the "eventRate" and "storageRate" keys?

slacmshankar commented 2 years ago

Fixed. The number of samples is now available as eventCount