Skip to content

metrics for force push - #7154

Merged
niik merged 12 commits into
developmentfrom
metrics-for-force-push
Mar 29, 2019
Merged

niik merged 12 commits into
developmentfrom
metrics-for-force-push

Conversation

@shiftkey

@shiftkey shiftkey commented Mar 25, 2019 •

Copy link
Copy Markdown
Member

Overview

Closes #6935

Description

The third item and fourth items will also add dotcomPushCount, enterprisePushCount and externalPushCount which do not currently exist on the usage site but were discussed back in #5549.

Release notes

Notes: no-notes

@shiftkey shiftkey added this to the 1.7.0 milestone Mar 25, 2019
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Mar 25, 2019
@shiftkey
shiftkey force-pushed the metrics-for-force-push branch 3 times, most recently from 1e00b28 to 7b88906 Compare March 26, 2019 23:28
@niik niik self-assigned this Mar 27, 2019

@niik niik 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.

Code looks good aside from that one comment about a redundant check but I have a question about the metric itself. With this change we would not count a force push in the general [dotCom|enterprise|generic]Push metric. Compare this to the division between commit and partialCommits where a partial commit gets counted both as a commit and as a partial commit.

In other words, in the commits case partial commits is a subset of the total number of commits and the commitCount is the overall number of commits regardless of type. In this case the pushCount and forcePushCount are non-overlapping segments.

Looking at another such scenario we have the pullWithDefaultSettingCount and pullWithRebaseCount. These are not ambiguous like the cases above since they're explicitly named to indicate that there are no overlap.

I don't have a strong preference here but I feel like we should strive towards a consistent approach or at the very least be really clear in the documentation such that we minimize the risk of confusion when we analyze the data. Right now the documentation is not clear on what's included and not:

The number of time the user pushed commits to a repo hosted on Github.com.

Reading that and not having read the code I would assume this meant all pushes regardless of whether they were forced or not.

cc @scottypate For any feedback or preference you might want to provide.

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

Copy link
Copy Markdown
Member Author

@niik that's a good shout, and I'm happy to count push --force-with-lease as a regular push too. @scottypate any issues on your end?

@scottypate

Copy link
Copy Markdown

any issues on your end?

Nope, It makes sense to me that the regular push should increment as well.

@shiftkey
shiftkey force-pushed the metrics-for-force-push branch from 7b88906 to 5d5e764 Compare March 27, 2019 11:08
@shiftkey
shiftkey requested a review from niik March 27, 2019 11:08
@niik
niik merged commit 0bfc5db into development Mar 29, 2019
@niik
niik deleted the metrics-for-force-push branch March 29, 2019 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants