Generating a map file during 'create-image' makes a lot of sense. I haven't tried without names enabled, but a .json file would make life easier compared to digging around in an .elf file or something similar.

On 04/10/16 20:06, Sterling Hughes wrote:
As I’m going through the statistics module and documenting it, one thing that occurs to me is for the case where STATS_NAME_ENABLE = 0, and statistic names are omitted, we should create the statistic name -> number mapping, in the target’s directory, in a machine parseable format (i.e. JSON.) I’m thinking we should put this into the manifest.json when we create an image, that way if a management system wants to ingest this data, it can easily take this information, along with the created image.

I thought about versioning the structure, however decided against it, because:

- Manually updating the statistics version when it changes is error prone, because people forget to change version numbers

- I think it is likely that any management system or user who wants to interpret these values, will likely have the image definition for that image, _AND_ will probably not do an exhaustive search of all images, to find one that has a matching definition of version of statistics that are found on that device. (likely:)

Comments welcome. Below is the documentation I’ve written at the top of the module.

NOTE: Newt does not yet support generating statistics mappings in the manifest.json, I’m adding that support to create-image now.

Reply via email to