Report slow SQL created from dynamic strings to Telemetry

RESOLVED FIXED in mozilla14

Status

()

Toolkit
Storage
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: vladan, Assigned: vladan)

Tracking

({perf})

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [Snappy:P2])

Attachments

(4 attachments, 4 obsolete attachments)

(Assignee)

Description

6 years ago
As a privacy safeguard, we are currently only reporting on the slow execution of prepared SQL statements. Consequently we are missing a lot of time-consuming SQL created from dynamic strings. We should investigate collecting metrics on such SQL and perhaps reporting only its JavaScript call stack instead of the actual SQL string.

Updated

6 years ago
Whiteboard: [Snappy:P2]
(Assignee)

Updated

6 years ago
Assignee: nobody → vdjeric
(Assignee)

Comment 1

6 years ago
Created attachment 602230 [details] [diff] [review]
Report full SQL strings locally & aggregate private stats for Telemetry, v1
Attachment #602230 - Flags: review?(taras.mozilla)
(Assignee)

Comment 2

6 years ago
Created attachment 602234 [details]
Sample about:telemetry output and corresponding Telemetry Ping report
(Assignee)

Comment 3

6 years ago
Created attachment 602352 [details] [diff] [review]
about-telemetry change
(Assignee)

Updated

6 years ago
Attachment #602352 - Attachment is patch: true
(Assignee)

Comment 4

6 years ago
Created attachment 602353 [details]
New about-telemetry, v0.9.2

Comment 5

6 years ago
Comment on attachment 602352 [details] [diff] [review]
about-telemetry change

s/fullSlowSQL/debugSlowSQL/. I'm still pondering rest of the stuff

Comment 6

6 years ago
Comment on attachment 602234 [details]
Sample about:telemetry output and corresponding Telemetry Ping report

I'm not sure of utility of telling addon dbs apart from non-addon dbs within the ping.

For now we should report a cumulative number like "dynamic query on x.sqlite"

We should also add a toolkit.telemetry.debugSlowSQL=false pref and gate private sql recording on that.

Comment 7

6 years ago
Comment on attachment 602230 [details] [diff] [review]
Report full SQL strings locally & aggregate private stats for Telemetry, v1

r- based on irc discussion
Attachment #602230 - Flags: review?(taras.mozilla) → review-
(Assignee)

Comment 8

6 years ago
Created attachment 603907 [details] [diff] [review]
about-telemetry change, v2
Attachment #602352 - Attachment is obsolete: true
(Assignee)

Comment 9

6 years ago
Created attachment 603908 [details]
New about-telemetry, v0.9.2
Attachment #602353 - Attachment is obsolete: true
(Assignee)

Comment 10

6 years ago
Created attachment 603909 [details] [diff] [review]
Report full SQL strings locally & aggregate private stats for Telemetry, v2
Attachment #602230 - Attachment is obsolete: true
Attachment #603909 - Flags: review?(taras.mozilla)
(Assignee)

Comment 11

6 years ago
Created attachment 603910 [details]
Sample about:telemetry output, v2
Attachment #602234 - Attachment is obsolete: true

Comment 12

6 years ago
Comment on attachment 603909 [details] [diff] [review]
Report full SQL strings locally & aggregate private stats for Telemetry, v2

AddonDb -> TrackedDB

+    fullSql.AppendPrintf(" /* addon DB %s */", dbName.BeginReading());

-- is the proper comment prefix for SQL.
s/addon/untracked/
Attachment #603909 - Flags: review?(taras.mozilla) → review+
(Assignee)

Comment 13

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/b411890365e8
Depends on: 712109
Target Milestone: --- → mozilla14
https://hg.mozilla.org/mozilla-central/rev/b411890365e8
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.