Add timing stats to Maintenance tab
This commit is contained in:
parent
0110f25152
commit
d5aecc6e8a
4 changed files with 90 additions and 6 deletions
|
@ -323,6 +323,13 @@ async function clearCache() {
|
|||
}
|
||||
}
|
||||
|
||||
async function getCacheSize() {
|
||||
if (!gCacheLoaded) {
|
||||
await loadCache();
|
||||
}
|
||||
return gCache.size;
|
||||
}
|
||||
|
||||
function classifyTextSync(text, criterion, cacheKey = null) {
|
||||
if (!Services?.tm?.spinEventLoopUntil) {
|
||||
throw new Error("classifyTextSync requires Services");
|
||||
|
@ -407,4 +414,4 @@ async function init() {
|
|||
await loadCache();
|
||||
}
|
||||
|
||||
export { classifyText, classifyTextSync, setConfig, removeCacheEntries, clearCache, getReason, getCachedResult, buildCacheKey, buildCacheKeySync, init };
|
||||
export { classifyText, classifyTextSync, setConfig, removeCacheEntries, clearCache, getReason, getCachedResult, buildCacheKey, buildCacheKeySync, getCacheSize, init };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue