Last active
June 21, 2021 19:51
-
-
Save wlach/035255e31a0e8eb75f5d1c624ffcd7df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Example of this script in action: https://github.com/mozilla/glean-annotations/pull/44 | |
# Meant to be run in the `annotations/fenix/metrics` directory | |
import os | |
import requests | |
metrics = requests.get('https://probeinfo.telemetry.mozilla.org/glean/fenix/metrics').json() | |
for metric_name in metrics.keys(): | |
if metric_name.startswith('perf.'): | |
os.makedirs(metric_name, exist_ok=True) | |
open(os.path.join(metric_name, "README.md"), 'w').write(f"""--- | |
tags: | |
- Performance | |
--- | |
This is a stub commentary for the `{metric_name}` metric: please feel free to edit (read the | |
[contributing guidelines](https://github.com/mozilla/glean-annotations/blob/main/CONTRIBUTING.md) | |
if you haven't done this before) | |
""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment