diff options
author | Andrew Newdigate <andrew@troupe.co> | 2017-03-13 16:47:39 +0300 |
---|---|---|
committer | Andrew Newdigate <andrew@troupe.co> | 2017-03-13 16:47:39 +0300 |
commit | ddcc0be42bb96028b0f13a6535e42901721a7ab2 (patch) | |
tree | 053b4b486bf8bf4bb0471cd9f0eeb8ab7a871812 /README.md | |
parent | a3329c95cda1f547bb79c756534456413ea9c1d0 (diff) |
📝 Documentation: how to generate the CSV
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -146,7 +146,7 @@ Based on the [daily overview dashboard](http://performance.gitlab.net/dashboard ### Order of Migration -Using data from the [daily overview dashboard](http://performance.gitlab.net/dashboard/db/daily-overview?panelId=14&fullscreen), +Using [data based on the](#generating-prioritization-data) [daily overview dashboard](http://performance.gitlab.net/dashboard/db/daily-overview?panelId=14&fullscreen), we've prioritised the order in which we'll work through the `gitlab-rails` controllers in descending order of **95% Cumulative Time** (that is `(number of calls) * (95% call time)`). @@ -179,6 +179,24 @@ with these calculations. (More to follow!) +### Generating the Priorization Data + +Use this script to generate a CSV of the 95 percentile accumulated for a 7 day period. + +This data will change over time, so it's important to reprioritize from time-to-time. + +```shell +influx \ + -host performance.gitlab.net \ + -username gitlab \ + -password $GITLAB_INFLUXDB_PASSWORD \ + -database gitlab \ + -execute "SELECT sum(count) as Amount, mean(duration_mean) AS Mean, mean(duration_95th) AS p95, sum(count) * mean(duration_95th) as Accum FROM downsampled.rails_git_timings_per_action_per_day WHERE time > now() - 7d GROUP BY action" \ + -format csv | \ + grep -v 'name,tags,'| \ + cut -d, -f2,3,4,5,6,7| \ + sed 's/action=//' > data.csv +``` ## Plan |