Skip to content

Add metrics #2

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

Closed
wants to merge 2 commits into from
Closed

Add metrics #2

wants to merge 2 commits into from

Conversation

wbamberg
Copy link
Member

@wbamberg wbamberg commented Mar 24, 2022

I would like us to get better at generating metrics for our activity. So I've filed this PR, that adds a couple of Node scripts.

The first one uses GitHub's API to fetch all PRs filed to mdn/content.

The second one uses that, and another file called "organizations.json", to work out, for each month, how many PRs were filed by members of a particular organization in each month. For example, it's currently hardcoded to use the "owd" org, so running it would give us:

2021-01: 15
2021-02: 12
2021-03: 17
2021-04: 32
2021-05: 49
2021-06: 167
2021-07: 168
2021-08: 168
2021-09: 163
2021-10: 119
2021-11: 80
2021-12: 51
2022-01: 51
2022-02: 98
2022-03: 122

...which is the number of PRs filed by OWD staff in each month. Obviously with different orgs we can compare.

I'm filing this here for a couple of reasons:

  • I think it's important for us to be transparent about our metrics, and if we have errors in the code I want to know about them
  • I'd be happy to get improvements from people who want to help improve them.

As you can see it's very rough at the moment (e.g. org being hardcoded to "owd"). But ready for feedback I think
(and usable now).

@wbamberg wbamberg marked this pull request as draft March 25, 2022 07:07
@teoli2003
Copy link
Member

NIT: Should we have an extra level to separate scripts about OWD metrics and those about MDN metrics (that we don't have yet, but I can see us creating)?

Like
metrics > OWD activities > (analyse|data|…)
metrics > MDN > … (not to be created now)

Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

My spell checker wants en-US! 😄

This looks good to me overall. I think you probably updated this already a bit to take into account BCD and to add the other orgs? If you push that here and maybe send around the fetched data, then I'm happy to test this on my machine, too.

@@ -0,0 +1,25 @@
This directory contains some scripts and data for generating metrics about the work of Open Web Docs.

It's got three subdirectories: *query*, *data*, and *analyse*.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
It's got three subdirectories: *query*, *data*, and *analyse*.
It's got three subdirectories: *query*, *data*, and *analyze*.

node query-prs.js MY-TOKEN-HERE
```

It's (obviously) advisable not to run this again and again, but to run it once, then analyse the results at your leisure.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
It's (obviously) advisable not to run this again and again, but to run it once, then analyse the results at your leisure.
It's (obviously) advisable not to run this again and again, but to run it once, then analyze the results at your leisure.


The "organizations.json" file contains an object each of whose keys represents an organization. The key is the organization name. Each organization object lists the GitHub usernames for people in that organization for each month we are interested in.

## analyse
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
## analyse
## analyze

@wbamberg wbamberg closed this Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants