Skip to content

[Stashing] Metrics - #7257

Merged
shiftkey merged 34 commits into
developmentfrom
stashing-them-metrics
May 29, 2019
Merged

shiftkey merged 34 commits into
developmentfrom
stashing-them-metrics

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented Apr 11, 2019 •

Copy link
Copy Markdown
Contributor

Fixes #7246

Adds telemetry to answer the questions:

  1. What percentage of the time do people bring their changes across to a different branch vs. stashing them in their current branch?
    • stashCreatedOnCurrentBranchCount
    • changesTakenToNewBranchCount
  2. What percentage of time are people restoring the stash vs. deleting the stash vs. neither of those things? The total of these should equal the number of times users return to a branch that contains a stash.
    • stashRestoreCount
    • stashDiscardCount
    • noActionTakenOnStashCount
  3. Of the times people return to a branch that contains a stash, what percentage of the time is the stash viewed?
    • stashViewedAfterCheckoutCount
    • stashNotViewedAfterCheckoutCount
  4. What percent of changes viewed are via clicking on the "Stashed changes" row directly vs. clicking on the prompt in the suggested next step?
    • suggestedStepViewStash
    • stashViewCount
  5. How many times do users currently stash outside of Desktop, and can we demonstrate that supporting this shows a decline in that overall per-user number?

Testing

To see metrics, go to Application -> IndexedDB -> StatsDatabase -> dailyMeasures in chrome devtools.

stashCreatedOnCurrentBranchCount

  1. Note the value of stashCreatedOnCurrentBranchCount
  2. Make changes
  3. Switch branches
  4. Select option to "stash on current branch"
  5. Verify stashCreatedOnCurrentBranchCount has been incremented by 1

changesTakenToNewBranchCount

  1. Note the value of changesTakenToNewBranchCount
  2. Make changes
  3. Switch branches
  4. Select option to "bring changes to new branch"
  5. Verify changesTakenToNewBranchCount has been incremented by 1

stashRestoreCount (performed on branch with existing stash)

  1. Note the value of stashRestoreCount
  2. Click Stashed Changes button to show stash diff
  3. Click Restore
  4. Verify stashRestoreCount has been incremented by 1

note, metric will increment even if restore fails since it's measuring user intent, not restore success

stashDiscardCount (performed on branch with existing stash)

  1. Note the value of stashDiscardCount
  2. Click Stashed Changes button to show stash diff
  3. Click Discard
  4. Verify stashDiscardCount has been incremented by 1

note, metric will increment even if restore fails since it's measuring user intent, not discard success

noActionTakenOnStashCount (performed on branch with existing stash)

  1. Note the value of noActionTakenOnStashCount
  2. Click Stashed Changes button to show stash diff
  3. Click Stashed Changes button again to hide the stash diff
  4. Verify noActionTakenOnStashCount has been incremented by 1

stashViewedAfterCheckoutCount

  1. Note the value of noActionTakenOnStashCount
  2. Checkout branch with existing stash
  3. Click Stashed Changes button to show stash diff
  4. Verify stashViewedAfterCheckoutCount has been incremented by 1
  5. Click Stashed Changes button to show stash diff again
  6. Verify stashViewedAfterCheckoutCount has not changed

stashNotViewedAfterCheckoutCount

  1. Note the value of stashNotViewedAfterCheckoutCount
  2. Checkout branch with existing stash
  3. Checkout another branch (doesn't matter if it has stash or not)
  4. Verify stashNotViewedAfterCheckoutCount has been incremented by 1

suggestedStepViewStash (performed on branch with existing stash)

  1. Note the value of suggestedStepViewStash
  2. Click the suggested next step to view stash
  3. Verify suggestedStepViewStash has been incremented by 1

stashViewCount (performed on branch with existing stash)

  1. Note the value of stashViewCount
  2. Click Stashed Changes button to show stash diff
  3. Verify stashViewCount has been incremented by 1
  4. Click Stashed Changes button to hide stash diff
  5. Verify stashViewCount has remained unchanged
  6. Click Stashed Changes button to show stash diff
  7. Verify stashViewCount has been incremented by 1

stashEntriesCreatedOutsideDesktop (start in a repo other than the testing repo)

  1. Note the value of stashEntriesCreatedOutsideDesktop
  2. Create 1 stash outside of desktop in the testing repo
  3. Open the testing repo
  4. Verify stashEntriesCreatedOutsideDesktop has been incremented by 1

note, since this metric is incremented on a schedule, once verifying the metric, a new repo will have to be created to get around the 24 hour check.

Comment thread app/src/ui/dispatcher/dispatcher.ts Resolved
@iAmWillShepherd iAmWillShepherd mentioned this pull request Apr 11, 2019
6 tasks done
@iAmWillShepherd
iAmWillShepherd changed the base branch from development to stash-changes-on-branch April 11, 2019 21:48
@outofambit outofambit added the epic:stashing Tracking label for work related to the stashing flow label Apr 23, 2019
@iAmWillShepherd
iAmWillShepherd changed the base branch from stash-changes-on-branch to development May 28, 2019 16:02
Comment thread app/src/ui/dispatcher/dispatcher.ts Resolved
@iAmWillShepherd
iAmWillShepherd changed the base branch from development to suggested-changes-metrics May 28, 2019 18:00
@outofambit
outofambit changed the base branch from suggested-changes-metrics to development May 28, 2019 20:07

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get a chance to test this out due to time constraints, but the only real bits of feedback I have at this point are non-blocking feedback. Everything else seems to be tracking fine.

Comment thread app/src/lib/stats/stats-store.ts Resolved
Comment thread app/src/lib/stores/app-store.ts Resolved
@outofambit

Copy link
Copy Markdown
Contributor

changesTakenToNewBranchCount ❌ never incremented for me

@tierninho @iAmWillShepherd this is something we need to investigate/address. i think its because this.statsStore.recordChangesTakenToNewBranch() is on the wrong line in _checkoutBranch. (will call out inline in the PR too.)

stashEntriesCreatedOutsideDesktop ❌ never incremented for me

@tierninho that is ok and expected for this PR. that metric is implemented in #7438, not here.

Comment thread app/src/lib/stores/app-store.ts Resolved
@tierninho
tierninho self-requested a review May 28, 2019 23:39
tierninho
tierninho previously approved these changes May 28, 2019

@tierninho tierninho left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: all tests now verified 👍 on 481ab72

outofambit
outofambit previously approved these changes May 29, 2019
Comment thread app/src/lib/stats/stats-store.ts Resolved
@nerdneha nerdneha added this to the 1.7.0 milestone May 29, 2019
const { isShowingStashEntry, dispatcher, repository } = this.props

if (isShowingStashEntry) {
dispatcher.selectWorkingDirectoryFiles(repository)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 let's follow up after the beta ship today and see if we can settle on something we're happier with

Comment thread app/src/ui/changes/no-changes.tsx Resolved
Comment thread app/src/lib/stats/stats-database.ts Resolved
shiftkey
shiftkey previously approved these changes May 29, 2019

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one typo to see, everything else is good.

I'd also like a second ✅ from @desktop/engineering before this goes out to beta.

Comment thread app/src/lib/stores/app-store.ts Resolved
outofambit
outofambit previously approved these changes May 29, 2019

@outofambit outofambit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

very crunchy

@iAmWillShepherd
iAmWillShepherd dismissed stale reviews from outofambit and shiftkey via fdea336 May 29, 2019 14:59
@shiftkey
shiftkey merged commit 4d44824 into development May 29, 2019
@shiftkey
shiftkey deleted the stashing-them-metrics branch May 29, 2019 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic:stashing Tracking label for work related to the stashing flow ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Metrics] Working with uncommitted changes

6 participants