Page MenuHomePhabricator

Track number of constraint definition snaks over time
Closed, ResolvedPublic

Description

We would like to monitor if the number of constraint definitions changes over time in order to see how the system is being used. For this we'd like to track the number of constraint definition snaks across all properties. They should be split by constraint type.

Event Timeline

Query:

SELECT ?type ?typeLabel ?count WHERE {
  {
    SELECT ?type (COUNT(DISTINCT ?constraint) AS ?count) WHERE {
      ?property a wikibase:Property;
                p:P2302 ?constraint.
      ?constraint ps:P2302 ?type.
    }
    GROUP BY ?type ?typeLabel
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?count)

Results

I assume to track this over time we need to run that query periodically somewhere and write the results to Graphite. @Addshore I think you set up something similar for the number of open tasks, do you know how to do this?

Minor detail: what exactly do we want to track? The most logical thing would be the constraint type item ID, but then it will be a bit tricky to look at in Grafana. But if we track the English label the results will become disconnected any time that label changes.

Change 425872 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[analytics/wmde/scripts@master] Track number of constraint definition snaks over time

https://gerrit.wikimedia.org/r/425872

Change 425872 merged by jenkins-bot:
[analytics/wmde/scripts@master] Track number of constraint definition snaks over time

https://gerrit.wikimedia.org/r/425872

Change 427348 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[analytics/wmde/scripts@production] Track number of constraint definition snaks over time

https://gerrit.wikimedia.org/r/427348

Change 427348 merged by jenkins-bot:
[analytics/wmde/scripts@production] Track number of constraint definition snaks over time

https://gerrit.wikimedia.org/r/427348

Change 427628 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Mention “constraint types” panel in README instructions

https://gerrit.wikimedia.org/r/427628

Change 427628 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Mention “constraint types” panel in README instructions

https://gerrit.wikimedia.org/r/427628