Repository navigation
Description
Goal
The goal of this project is to provide insights on Desktop's performance so the team can make informed product decisions and to better prioritize issues.
At the moment, much is unknown about how Desktop performs in the wild. Every now and again, we will get an issue where a user is having a bad experience with Desktop on their computer while the team has to guess what could be causing such terrible performance. This is not ideal because it increases the difficulty of determining the impact an issue has and slows the pace at which we get answers — if we get an answer at all.
What success looks like
I will consider this project a success if we are able to answer any of the questions from these five categories:
| Category | Questions |
|---|---|
| Workflow | What do our users spend most of their time doing? Which workflow (part or full) is slowest? How long does each step in a workflow normally take? |
| RAM | What is Desktop’s memory usage over time? |
| Network | How much time are our users spending waiting on Desktop to complete API requests? |
| Errors | When are users encountering errors? What are they? Is it a trend? |
Where are we now?
The current format of our metrics package is unable to support the level of granularity needed to give any insight on the areas defined above, so we will have to revise how we collect and submit usage. Thomas and I spent a short amount of time discussing what a new metrics package would look like and we agreed that we should try to incorporate what’s being done in atom/telemetry.
Refined Data structure we came up with to submit metrics
[
{
"dimension": {
"user_guid": "",
"installation_guid": "",
"event_type": "commit"
},
"measure": {
"network_time": -1,
"memory_usage": 8e+8
}
}
]The key difference between this structure and the one in production is the one we are suggesting has an event granularity while the one in production is aggregated data.
What needs to get done
This list is not complete as these are the things that need to be done before we can move to bigger more interesting things like creating new Mode Looker dashboards.
- Come up with new data structure that supports our new data needs and implement them: Update stats reporting data structure #5695
- Determine metrics we'd like to start tracking and get them implemented in code
- Update central to be compatible with new metrics format
- POC using structured logging
cc, @desktop/analytics
Activity
[-][DRAFT RFC] Desktop Performance[/-][+][DRAFT] Desktop Performance RFC[/+]shiftkey commentedon Sep 14, 2018
Re: measuring CPU utilization - this Twitter thread has some interesting food for thought cc @NickCraver https://twitter.com/Nick_Craver/status/1038747663636877312
outofambit commentedon Sep 19, 2018
this looks awesome. @iAmWillShepherd should i be comparing this to the data structure in laid out in https://desktop.github.com/usage-data/?
iAmWillShepherd commentedon Sep 19, 2018
@shiftkey maybe CPU utilization is the wrong word. I was thinking more like CPU-bound work. So something like computing ahead/behind for each branch in a repo would be considered CPU bound work.
iAmWillShepherd commentedon Sep 19, 2018
@outofambit yes, that is currently the state of our metrics. We may have to rework that structure to answer the questions we want, but what's there now should be sufficient to wrap your head around things.
[-][DRAFT] Desktop Performance RFC[/-][+]Desktop Performance RFC[/+]iAmWillShepherd commentedon Sep 20, 2018
@shiftkey, I removed the CPU category, if we decide that would be useful in the feature, we can have a discussion then on how best to capture and analyze that data.
shiftkey commentedon Sep 20, 2018
A couple of general questions:
iAmWillShepherd commentedon Sep 20, 2018
At the moment, it doesn't, but I think it should.
@shiftkey shared this bit of code that controls how we log slow git operations. It may be worth creating another performance logger instance that way we could send slow git operations along with our normal stats package.
desktop/app/src/ui/lib/git-perf.ts
Lines 28 to 34 in e4754a2
Not sure I understand what generating this data means...
Yes, I spoke with @desktop/analytics and we are thinking we can use the work done over in atom/telemetry.
shiftkey commentedon Sep 20, 2018
If we're looking to measure performance of parts of the app, what would developers working in the codebase need to do to opt-in for measuring their code and sending the details to this telemetry package? It doesn't have to be set in stone yet, but it'd be cool to bridge the gap between your document and getting something live.
Some examples that I can think of, based on your spec:
fetchAPI? from somewhere else?app.getProcessMemoryInfo()periodically to see how memory usage changes over time - does that give us enough detail?iAmWillShepherd commentedon Sep 20, 2018
I'm singling out this question because to answer it depends on what we define a workflow to be and how we choose to represent one. In other words, we need to figure out what workflows exists, then figure out what steps that workflow is composed of. Once we have that info, I think we can use that to inform how we measure the time a workflow takes to complete.
billygriffin commentedon Sep 21, 2018
Just want to call out that for memory usage in particular (we had some conversation around this relating to #3149 (comment)), one thing I think we want to make sure we're able to get is the distribution of users who are above some level of memory (ideally just the entire distribution). Averages don't tell me anything useful here, but if we knew that 10% of users had over some level of memory consumption that we consider to be unacceptable, that would be SUPER meaningful information.
cc: @desktop/analytics
Buchananm739 commentedon Jun 18, 2019