bug 1101194 - add telemetry for DataStorage table size r=mgoodwin

This commit is contained in:
David Keeler 2015-01-07 13:23:07 -08:00
parent baaf4bfeb4
commit d11cf2ca74
2 changed files with 14 additions and 0 deletions

View File

@ -8,6 +8,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/Telemetry.h"
#include "mozilla/unused.h"
#include "nsAppDirectoryServiceDefs.h"
#include "nsDirectoryServiceUtils.h"
@ -110,6 +111,12 @@ private:
DataStorage::Reader::~Reader()
{
{
MutexAutoLock lock(mDataStorage->mMutex);
Telemetry::Accumulate(Telemetry::DATA_STORAGE_ENTRIES,
mDataStorage->mPersistentDataTable.Count());
}
// Notify that calls to Get can proceed.
{
MonitorAutoLock readyLock(mDataStorage->mReadyMonitor);

View File

@ -7069,5 +7069,12 @@
"kind": "count",
"keyed": true,
"description": "Counts of plugin and content process crashes which are reported with a crash dump."
},
"DATA_STORAGE_ENTRIES": {
"expires_in_version": "default",
"kind": "linear",
"high": "1024",
"n_buckets": 16,
"description": "The number of entries in persistent DataStorage (HSTS and HPKP data, basically)"
}
}