Simple performance logging

This commit is contained in:
Jeremy Ruston 2024-02-20 09:33:39 +00:00
parent bab14b7053
commit 6503fb4a04
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,7 @@ exports.before = ["story"];
exports.synchronous = true;
exports.startup = function() {
console.log(`Initialising MWSS`)
console.log(`Initialising MWS`)
var path = require("path");
// Install the sqlite3 global namespace
$tw.sqlite3 = {
@ -51,6 +51,8 @@ console.log(`Initialised sqlTiddlerStore`)
store: store,
uploadManager: uploadManager
};
// Performance timing
console.time("mws-initial-load");
// Create docs bag and recipe
$tw.mws.store.createBag("docs","TiddlyWiki Documentation from https://tiddlywiki.com/");
$tw.mws.store.createRecipe("docs",["docs"],"TiddlyWiki Documentation from https://tiddlywiki.com/");
@ -70,6 +72,7 @@ console.log(`Initialised sqlTiddlerStore`)
$tw.mws.store.saveBagTiddler({title: "$:/SiteTitle",text: "Bag Alpha"},"bag-alpha");
$tw.mws.store.saveBagTiddler({title: "$:/SiteTitle",text: "Bag Beta"},"bag-beta");
$tw.mws.store.saveBagTiddler({title: "$:/SiteTitle",text: "Bag Gamma"},"bag-gamma");
console.timeEnd("mws-initial-load");
};
})();