Commit Graph

2 Commits

Author SHA1 Message Date
Laurent Charignon
73a45df608 sampling: add event filtering
Summary:
Before this patch, all the events logged by the sampling extensions
were dumped to the log file. With this patch, one can specify the relevant
events to log as well as a value to be added for each event. This will be
useful to specify what logging table to use for each of the logged events.
More information added to the documentation accordingly.

Test Plan:
The test changes accordingly and we add events that gets stopped
by the filter to make sure that the filter works.

Reviewers: ttung, durham

Differential Revision: https://phabricator.intern.facebook.com/D3387446
2016-06-07 10:24:56 -07:00
Laurent Charignon
a9ed24d6e3 sampling: add new extension
Summary:
This patch adds a new extension: sampling. It allows us to collect
aggregated data to a log file for each command that runs.
We will use it with our wrapper to collect data on sqldirstate and fastmanifest.

The workflow:
- Wrapper creates a log file, passes it to mercurial through an environment variable
- Mercurial writes data to this log file
- The wrapper parses the log file and upload its content to a data logging backend

Test Plan: Add a test

Reviewers: mitrandir, wez, ttung

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3360988
2016-06-02 16:19:05 -07:00