Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@troupe.co>2017-03-13 16:47:39 +0300
committerAndrew Newdigate <andrew@troupe.co>2017-03-13 16:47:39 +0300
commitddcc0be42bb96028b0f13a6535e42901721a7ab2 (patch)
tree053b4b486bf8bf4bb0471cd9f0eeb8ab7a871812
parenta3329c95cda1f547bb79c756534456413ea9c1d0 (diff)
📝 Documentation: how to generate the CSV
-rw-r--r--README.md20
1 files changed, 19 insertions, 1 deletions
diff --git a/README.md b/README.md
index cb4f3c131..fcda5d25c 100644
--- a/README.md
+++ b/README.md
@@ -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