• tby's avatar
    [Structured metrics] Change on-disk event format · 9a3da8cb
    tby authored
    Events are currently stored in this format:
    
    {"events":[{event1}, {event2}, {event3}], "keys":{...}}
    
    But we are about to create new categories of event, related to whether
    they are associated with the UMA client ID or not. This requires we
    store two separate event lists on-disk. This will look like:
    
    {"events":{
      "independent":[{event1}, {event2}, {event3}],
      "associated":[....]},
     "keys":{...}}
    
    This CL:
    
    - refactors the logic for getting the events list, creating
      GetEventsList.
    - adds logic to migrate from the old storage format to the new.
    
    Bug: 1148168
    Change-Id: I1d828a4e44b2e483b908a53d5d47c241f3603b8b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532164
    Commit-Queue: Tony Yeoman <tby@chromium.org>
    Reviewed-by: default avatarRachel Wong <wrong@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#827666}
    9a3da8cb
event_base.h 3.07 KB