Page MenuHomePhabricator

Running query twice reports duration since Epoch instead of since starting point
Closed, ResolvedPublic

Description

Open any query. Preferably a cheap one, e. g. this one.

Double-click the Execute button.

In the “in X ms” field, you’ll very briefly see the duration of the first execution, and then an incorrect duration for the second one:

in 1456271541357 ms

This is simply the number of milliseconds since the Epoch (verify with date -d @<duration minus last three digits>). The first execution probably resets the start timestamp to 0 ms when it finishes, and then the second execution calculates the offset from that.

The simplest solution, I suppose, is to deactivate the Execute button until the currently running query terminates (result, timeout, error, …).

Event Timeline

Restricted Application added a project: Discovery. · View Herald TranscriptFeb 23 2016, 11:57 PM
Restricted Application added subscribers: StudiesWorld, Aklapper. · View Herald Transcript
Deskana moved this task from Needs triage to WDQS on the Discovery board.Feb 25 2016, 1:09 AM
Smalyshev triaged this task as Normal priority.Mar 9 2016, 1:57 AM

Change 276245 had a related patch set uploaded (by Jonas Kress (WMDE)):
Disable submit button while query is running

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

Change 276245 merged by jenkins-bot:
Disable submit button while query is running

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

Smalyshev closed this task as Resolved.Mar 10 2016, 7:28 AM