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 moved this task from incoming to in progress on the Wikidata board.Sep 18 2018, 2:22 PM
Addshore triaged this task as Normal priority.Sep 19 2018, 7:02 AM
Jonas updated the task description. (Show Details)Sep 28 2018, 10:25 AM
Jonas updated the task description. (Show Details)Sep 28 2018, 10:43 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 added a subscriber: Ladsgroup.

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

Addshore removed Matthias_Geisler_WMDE as the assignee of this task.Oct 9 2018, 10:12 AM
Addshore added a subscriber: Matthias_Geisler_WMDE.

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:

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.

Addshore closed this task as Resolved.Nov 14 2018, 4:16 PM

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.