Skip to content

Commit

Permalink
Remove microprofiler
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfernandez committed Sep 12, 2023
1 parent 57cca69 commit 5fac611
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/parser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import microprofiler from 'microprofiler'

const bodySeparator = '\r\n\r\n'
const lineSeparator = '\r\n'
Expand Down Expand Up @@ -36,13 +35,10 @@ export class Parser {
// cannot parse yet
return
}
//const start1 = microprofiler.start()
this.packetInfo = new PacketInfo(this.pending.length, division)
const messageHeader = this.pending.subarray(0, division)
const messageBody = this.pending.subarray(division + 4)
this.parseFirstLine(messageHeader)
//microprofiler.measureFrom(start1, 'parse first line', 100000)
//const start2 = microprofiler.start()
const key = this.packetInfo.getKey()
const existing = packetInfos.get(key)
if (existing && this.packetInfo.isDuplicated(existing)) {
Expand All @@ -52,10 +48,7 @@ export class Parser {
}
packetInfos.set(key, this.packetInfo)
this.parseHeaders(messageHeader)
//microprofiler.measureFrom(start2, 'parse headers', 100000)
const start3 = microprofiler.start()
this.parseBody(messageBody)
microprofiler.measureFrom(start3, 'parse body', 100000)
}

parseFirstLine(messageHeader) {
Expand Down

0 comments on commit 5fac611

Please sign in to comment.