summaryrefslogtreecommitdiffstats
path: root/mailnews/db/gloda/modules/datastore.js
diff options
context:
space:
mode:
Diffstat (limited to 'mailnews/db/gloda/modules/datastore.js')
-rw-r--r--mailnews/db/gloda/modules/datastore.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/mailnews/db/gloda/modules/datastore.js b/mailnews/db/gloda/modules/datastore.js
index c9374c563..70bbdc6a7 100644
--- a/mailnews/db/gloda/modules/datastore.js
+++ b/mailnews/db/gloda/modules/datastore.js
@@ -1030,6 +1030,17 @@ var GlodaDatastore = {
var dbConnection;
+ // Report about the size of the database through telemetry (if there's a
+ // database, naturally).
+ if (dbFile.exists()) {
+ try {
+ let h = Services.telemetry.getHistogramById("THUNDERBIRD_GLODA_SIZE_MB");
+ h.add(dbFile.fileSize/1048576);
+ } catch (e) {
+ this._log.warn("Couldn't report telemetry", e);
+ }
+ }
+
// Create the file if it does not exist
if (!dbFile.exists()) {
this._log.debug("Creating database because it doesn't exist.");