This will allow us to easily visualize differences between wikis and the evolution of responses over time.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Collect performance survey response metrics | performance/navtiming | master | +16 -1 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Resolved | • Gilles | T165272 Review research on performance perception | |||
| Declined | • Gilles | T184510 Ideas for performance perception studies | |||
| Resolved | • Gilles | T187299 User-perceived page load performance study | |||
| Resolved | • Gilles | T196528 Setup dashboard for performance survey responses |
Event Timeline
I came up with this code and tested it successfully on stat1005:
import json
import statsd
from kafka import KafkaConsumer
consumer = KafkaConsumer('eventlogging_QuickSurveysResponses', group_id='perf-survey-kafka-to-statsd', bootstrap_servers=['kafka-jumbo1001.eqiad.wmnet:9092'])
statsd_client = statsd.StatsClient('statsd.eqiad.wmnet', 8125)
for msg in consumer:
object = json.loads(msg.value)
wiki = object['wiki']
# Example: ext-quicksurveys-example-internal-survey-answer-neutral
response = object['event']['surveyResponseValue'][48:]
key = 'performance.survey.{}.{}'.format(wiki, response)
print key
statsd_client.incr(key)It's a small daemon that forwards the response values per wiki to statsd from the EventLogging kafka. This will allow us to easily graph this in Grafana.
It's probably best to run this code on one of the performance team's production servers. I'll find a home for it in Puppet.
Change 437731 had a related patch set uploaded (by Gilles; owner: Gilles):
[performance/navtiming@master] Collect performance survey response metrics
Change 437731 merged by jenkins-bot:
[performance/navtiming@master] Collect performance survey response metrics
Here it is: https://grafana.wikimedia.org/dashboard/db/performance-perception-survey?orgId=1
Not enough data for even cawiki to render properly, though. When there's more data I'll switch to aggregating by 24-hour period and looking at a 7-day period.