mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Remove all C++ telemetry autotimers
This commit is contained in:
parent
8c8145e620
commit
ad782894c8
28 changed files with 37 additions and 119 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue