aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
authorOmar Rizwan <omar.rizwan@gmail.com>2018-11-24 00:33:04 -0800
committerOmar Rizwan <omar.rizwan@gmail.com>2018-11-24 00:33:04 -0800
commitc8fad64066650ed6089bf3bf39dbf3f5389f3a04 (patch)
tree365a6a0b68a087e2fb8d7549be93a358ba41bed6 /extension
parent528467a55bf5b7ca1692ec0341191abf334d9419 (diff)
Multithreaded. Is this gonna help?
Only tested with single-thread mode still on so far.
Diffstat (limited to 'extension')
-rw-r--r--extension/background.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/extension/background.js b/extension/background.js
index 72cfa73..1b2b5cc 100644
--- a/extension/background.js
+++ b/extension/background.js
@@ -160,6 +160,7 @@ ws.onmessage = async function(event) {
const req = JSON.parse(event.data);
let response = { op: req.op, error: unix.EIO };
+ console.time(req.op + ':' + req.path);
try {
if (req.op === 'getattr') {
response = {
@@ -195,13 +196,14 @@ ws.onmessage = async function(event) {
op: 'release'
};
}
-
} catch (e) {
response = {
op: req.op,
error: e instanceof UnixError ? e.error : unix.EIO
}
}
+ console.timeEnd(req.op + ':' + req.path);
+ response.id = req.id;
ws.send(JSON.stringify(response));
};