Load testing using K6.io results in High CPU usage

the issue is KOA @DMehaffy.

Here is a very simple koa script talking to postgres, run this and load test using k6.io you will get about 80% cpu

const Koa = require('koa');
const Router = require('koa-router');
const Logger = require('koa-logger');
const { Pool } = require('pg');

const app = new Koa();
const router = new Router();

app.pool = new Pool({
  user: 'postgres',
  host: 'localhost',
  database: 'postgres',
  password: '', 
  port: 5432, 
});


router.get('/:id', async (ctx) => {
  const { rows } = await ctx.app.pool.query('select * from public.badges ORDER BY random()')
  ctx.body = rows[0];
});


// Development logging
app.use(Logger());
// Add routes and response to the OPTIONS requests
app.use(router.routes()).use(router.allowedMethods());

// Listen the port
app.listen(1337, () => {
  console.log('Server running on port 1337');
});