Page MenuHomePhabricator

Add more tracking for constraint checks
Closed, ResolvedPublic

Description

We want to track some more things in Grafana. At least:

  • Total time for a constraint check on an entity (currently we only track time for individual checks).
    • Log item id for checks that run longer than 2 minutes (config variable)
  • Total number of (uncached) constraint checks?
  • Runtime of PHP type check vs. SPARQL type check, to assess whether the current trade-off between them makes sense
  • …?

Code to look at:
LoggingHelper.php

Event Timeline

Addshore triaged this task as Medium priority.Sep 19 2018, 7:02 AM

Change 463936 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[mediawiki/extensions/WikibaseQualityConstraints@master] Add more tracking for constraint checks

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

Ladsgroup subscribed.

Jenkins is failing. You need to fix the linting issues, otherwise looks good.

Change 471777 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Track more detailed timings in TypeCheckerHelper

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

Change 463936 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Add more tracking for constraint checks

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

Change 471777 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Track more detailed timings in TypeCheckerHelper

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

Can you point me to where in grafana they are now?

I’ve added the type check timings to the wikidata-quality board now. Here’s a screenshot of the current state:

Screenshot_2018-11-09 Grafana - Wikidata Quality.png (338×949 px, 50 KB)

My interpretation of this is that 60-70% of type checks already happen in PHP, and they still take very little time compared to the SPARQL type checks, even the ones that end up falling back to SPARQL. So we might want to change the configuration to do more checks in PHP (i. e., let PHP check more entities before falling back to SPARQL).

Total runtime for all constraint checks of an entity isn’t on the board yet, I’m not sure where to put it.

Total runtime for all constraint checks of an entity isn’t on the board yet, I’m not sure where to put it.

I added a simple graph for this just so that it is displayed and can be watched even if this stuff moves around later down the road.

So we might want to change the configuration to do more checks in PHP (i. e., let PHP check more entities before falling back to SPARQL).

See T209504: Perform more constraint type checks in PHP before falling back to SPARQL.