Skip to content

Commit

Permalink
Add stats.metaverse debugging statements.
Browse files Browse the repository at this point in the history
Add debugging logging to Db.countObjects.
  • Loading branch information
Misterblue committed Nov 2, 2020
1 parent 918ae77 commit 259c4d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Monitoring/StatsMetaverse.ts
Expand Up @@ -39,6 +39,7 @@ export class StatsMetaverse extends Stat {
const numOnline = await Accounts.accountCount(
new GenericFilter( { 'timeOfLastHeartbeat': { '$gte': Accounts.dateWhenNotOnline }})
);
Logger.debug(`StatsMetaverse.totalOnline: counting ${numOnline}`);
stat.Event(numOnline);
});
if (Config.monitoring.history) {
Expand Down
1 change: 1 addition & 0 deletions src/Tools/Db.ts
Expand Up @@ -172,6 +172,7 @@ export async function deleteOne(pCollection: string, pCriteria: CriteriaFilter):
// Return a count of the documents that match the passed filter
export async function countObjects(pCollection: string,
pFilter: CriteriaFilter): Promise<number> {
Logger.cdebug('db-query-detail', `Db.countObjects: collection=${pCollection}, criteria=${JSON.stringify(pFilter.criteriaParameters)}`);
return await Datab.collection(pCollection).countDocuments(pFilter);
};

Expand Down

0 comments on commit 259c4d6

Please sign in to comment.