atom / fuzzy-finder

Find and open files quickly
MIT License
276 stars 138 forks source link

Add metrics for fuzzy-finder filtering time #375

Closed rafeca closed 5 years ago

rafeca commented 5 years ago

Summary

In order to understand better the real world performance of the fuzzy-finder and allow us to take better decisions, we want to start logging the time it takes to execute a filtering action.

Along with the time taken to do the filtering, we want to log some additional metadata:

Since the standard scoring system is not controlled by the fuzzy finder (but via atom-select-list) we cannot easily log it from here. That's not a big deal since we're planning on deprecating that system.

Schema of the data

Sample JSON payload

{
  "eventType": "fuzzy-finder-v1",
  "durationInMilliseconds": 539,
  "metadata": {
    "ec": "time-to-filter",
    "el": "fast",
    "ev": 789,
    "cd2": "x64",
    "cd3": "x64",
    "cm1": 180,
    "cm2": 83,
    "sr": "1680x1050",
    "vp": "1680x591",
    "aiid": "dev"
  },
  "date": "2019-03-21T17:05:32.706Z"
}

Verification process

//cc @telliott27

rafeca commented 5 years ago

Something worth to notice is that this is going to create an event for every single keypress on the fuzzy finder. I'm going to add some logic to throttle the number of events so we send maximum one e.g every minute or so.