summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-09-04 09:41:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-09-04 09:41:24 +0200
commit93cae908bcbd063f21d5663a7d3149464af2ad20 (patch)
tree8809b848f23acede820937356df6083a3f57685c /toolkit
parentab961aeb54335fd07c66de2e3b8c3b6af6f89ea2 (diff)
downloaduxp-93cae908bcbd063f21d5663a7d3149464af2ad20.tar.gz
Remove all C++ telemetry autotimers
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/url-classifier/Classifier.cpp4
-rw-r--r--toolkit/components/url-classifier/LookupCache.cpp2
-rw-r--r--toolkit/components/url-classifier/VariableLengthPrefixSet.cpp13
-rw-r--r--toolkit/components/url-classifier/nsUrlClassifierDBService.cpp2
-rw-r--r--toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp16
5 files changed, 9 insertions, 28 deletions
diff --git a/toolkit/components/url-classifier/Classifier.cpp b/toolkit/components/url-classifier/Classifier.cpp
index e183728bd5..b9d0ace1bd 100644
--- a/toolkit/components/url-classifier/Classifier.cpp
+++ b/toolkit/components/url-classifier/Classifier.cpp
@@ -412,8 +412,6 @@ Classifier::Check(const nsACString& aSpec,
uint32_t aFreshnessGuarantee,
LookupResultArray& aResults)
{
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_CL_CHECK_TIME> timer;
-
// Get the set of fragments based on the url. This is necessary because we
// only look up at most 5 URLs per aSpec, even if aSpec has more than 5
// components.
@@ -505,8 +503,6 @@ Classifier::Check(const nsACString& aSpec,
nsresult
Classifier::ApplyUpdates(nsTArray<TableUpdate*>* aUpdates)
{
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_CL_UPDATE_TIME> timer;
-
PRIntervalTime clockStart = 0;
if (LOG_ENABLED()) {
clockStart = PR_IntervalNow();
diff --git a/toolkit/components/url-classifier/LookupCache.cpp b/toolkit/components/url-classifier/LookupCache.cpp
index 420e07433a..7c4d7682b3 100644
--- a/toolkit/components/url-classifier/LookupCache.cpp
+++ b/toolkit/components/url-classifier/LookupCache.cpp
@@ -541,8 +541,6 @@ static void EnsureSorted(T* aArray)
nsresult
LookupCacheV2::ConstructPrefixSet(AddPrefixArray& aAddPrefixes)
{
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_PS_CONSTRUCT_TIME> timer;
-
nsTArray<uint32_t> array;
if (!array.SetCapacity(aAddPrefixes.Length(), fallible)) {
return NS_ERROR_OUT_OF_MEMORY;
diff --git a/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp b/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp
index e9d6770d35..a387a698c6 100644
--- a/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp
+++ b/toolkit/components/url-classifier/VariableLengthPrefixSet.cpp
@@ -209,8 +209,6 @@ VariableLengthPrefixSet::LoadFromFile(nsIFile* aFile)
NS_ENSURE_ARG_POINTER(aFile);
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_VLPS_FILELOAD_TIME> timer;
-
nsCOMPtr<nsIInputStream> localInFile;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile,
PR_RDONLY | nsIFile::OS_READAHEAD);
@@ -255,15 +253,12 @@ VariableLengthPrefixSet::StoreToFile(nsIFile* aFile)
uint32_t fileSize = 0;
// Preallocate the file storage
- {
- nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile));
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_VLPS_FALLOCATE_TIME> timer;
+ nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile));
- fileSize += mFixedPrefixSet->CalculatePreallocateSize();
- fileSize += CalculatePreallocateSize();
+ fileSize += mFixedPrefixSet->CalculatePreallocateSize();
+ fileSize += CalculatePreallocateSize();
- Unused << fos->Preallocate(fileSize);
- }
+ Unused << fos->Preallocate(fileSize);
// Convert to buffered stream
nsCOMPtr<nsIOutputStream> out =
diff --git a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
index 3cf24847ed..d3018aa2db 100644
--- a/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
@@ -1814,8 +1814,6 @@ nsUrlClassifierDBService::Shutdown()
gShuttingDownThread = true;
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_SHUTDOWN_TIME> timer;
-
mCompleters.Clear();
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
diff --git a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
index 8745654703..3cfdf7a35f 100644
--- a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
@@ -315,8 +315,6 @@ nsUrlClassifierPrefixSet::LoadFromFile(nsIFile* aFile)
{
MutexAutoLock lock(mLock);
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_PS_FILELOAD_TIME> timer;
-
nsCOMPtr<nsIInputStream> localInFile;
nsresult rv = NS_NewLocalFileInputStream(getter_AddRefs(localInFile), aFile,
PR_RDONLY | nsIFile::OS_READAHEAD);
@@ -356,17 +354,13 @@ nsUrlClassifierPrefixSet::StoreToFile(nsIFile* aFile)
uint32_t fileSize;
- // Preallocate the file storage
- {
- nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile));
- Telemetry::AutoTimer<Telemetry::URLCLASSIFIER_PS_FALLOCATE_TIME> timer;
+ nsCOMPtr<nsIFileOutputStream> fos(do_QueryInterface(localOutFile));
- fileSize = CalculatePreallocateSize();
+ fileSize = CalculatePreallocateSize();
- // Ignore failure, the preallocation is a hint and we write out the entire
- // file later on
- Unused << fos->Preallocate(fileSize);
- }
+ // Ignore failure, the preallocation is a hint and we write out the entire
+ // file later on
+ Unused << fos->Preallocate(fileSize);
// Convert to buffered stream
nsCOMPtr<nsIOutputStream> out =