Skip to content

Commit 7d6c0f1

Browse files
Report response time
1 parent a6bc4d5 commit 7d6c0f1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ dist
116116
.pnp.*
117117

118118
# Compiled code
119+
coverage/
120+
docs/
119121
lib/
120122

121123
# Mac files

src/connection.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export class SQLiteCloudConnection {
228228

229229
let buffer = Buffer.alloc(0)
230230
const rowsetChunks: Buffer[] = []
231+
const startedOn = new Date()
231232
this.log(`Send: ${commands}`)
232233

233234
// define what to do if an answer does not arrive within the set timeout
@@ -266,7 +267,8 @@ export class SQLiteCloudConnection {
266267
if (bufferString.length > 1000) {
267268
bufferString = bufferString.substring(0, 100) + '...' + bufferString.substring(bufferString.length - 40)
268269
}
269-
this.log(`Receive: ${bufferString}`)
270+
const elapsedMs = new Date().getTime() - startedOn.getTime()
271+
this.log(`Receive: ${bufferString} - ${elapsedMs}ms`)
270272
}
271273

272274
// need to decompress this buffer before decoding?

0 commit comments

Comments
 (0)