Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics logging for time to search in project #1078

merged 6 commits into from May 8, 2019


None yet
3 participants
Copy link

commented May 8, 2019

Description of the Change

This PR makes use of the atom/metrics package to be able to log the time it takes to search all results on a project by the find and replace package.

  • eventType: find-and-replace-v1

  • metadata

    field value
    ec time-to-search
    ev Number of found results

Sample payload:

  "eventType": "find-and-replace-v1",
  "durationInMilliseconds": 321,
  "metadata": {
    "ec": "time-to-search",
    "ev": 4,
    "cd2": "x64",
    "cd3": "x64",
    "cm1": 180,
    "cm2": 83,
    "sr": "1680x1050",
    "vp": "1680x591",
    "aiid": "dev"
  "date": "2019-05-08T09:59:11.621Z"

Test plan

  • Check that atom/telemetry sends the correct payload to GitHub's backend. To do so, I've enabled the debug mode in the package and looked at the developer tools in Atom:

    Screenshot 2019-05-08 at 12 04 55

Alternate Designs



More information about the performance of the find and replace package.

Possible Drawbacks


@rafeca rafeca requested review from jasonrudolph and nathansobo May 8, 2019

Copy link

left a comment


if (this.reporter) {
this.reporter.addTiming(this.eventType, duration, metadata)
} else {
this.timingsQueue.push([duration, metadata])

This comment has been minimized.

Copy link

nathansobo May 8, 2019


This is subjective and minor, but pushing { duration, metadata } would have made setReporter slightly more readable for me.


This comment has been minimized.

Copy link

commented May 8, 2019

I see that @nathansobo has already reviewed this pull request, so I'll skip it unless you really really want my eyes on these changes.

@rafeca rafeca merged commit bd3f1d7 into master May 8, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@rafeca rafeca deleted the add-metrics branch May 8, 2019

@rafeca rafeca self-assigned this May 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.