Skip to content

Commit

Permalink
修正measure
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jan 19, 2022
1 parent 8342418 commit c494ca3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/measure.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ router.get('/:size(\\d+)', (req, res) => {
const size = parseInt(req.params.size, 10)
if (isNaN(size) || size > 200) return res.sendStatus(400)
const buffer = Buffer.alloc(1024 * 1024, '0066ccff', 'hex')
res.set('content-length', (size * 1024 * 1024).toString())
for (let i = 0; i < size; i++) {
res.send(buffer)
res.write(buffer)
}
})

Expand Down

0 comments on commit c494ca3

Please sign in to comment.