• sque@chromium.org's avatar
    metrics: Use absolute interval-based perf collection · dbd4e609
    sque@chromium.org authored
    Replace the old CWP collection scheme with a new scheme:
    - Divide post-login time into four-hour intervals.
    - Randomly select a time in each interval to collect a perf profile. The
      probability distribution should be even across that interval.
    - Use the new SampledProfile protobuf to store the collected data.
    
    Note that since this patch still collects only perf data, the module
    perf_provider_chromeos is not renamed to reflect something more generic.
    We would like to introduce other types of data collection in the future
    but they may be in other modules, or we may create a new generic module
    for data collection.
    
    BUG=chromium:358778
    TEST=The interval is too long to directly test. Shorten it to something
    on the order of a minute and rebuild and deploy Chrome. Should be getting
    some profile collections.
    I added some logging to print the collected data size. It's around 12 kB,
    and I get the same size data from running quipper manually:
    quipper 2 `which perf` record -a -e cycles -c 1000003 > /usr/local/perf.proto
    Signed-off-by: default avatarSimon Que <sque@chromium.org>
    
    Review URL: https://codereview.chromium.org/282093011
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273971 0039d316-1c4b-4281-b951-d872f2087c98
    dbd4e609
perf_provider_chromeos.h 3.67 KB