show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http from 'k6/http'; | |
import { check, sleep } from 'k6'; | |
export const options = { | |
vus: 10, | |
duration: '240s', | |
rps: 1000, | |
throw: true, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======K6 stript.js====== | |
import { check } from 'k6'; | |
import http from 'k6/http'; | |
// create const options | |
export const options = { | |
stages: [ | |
{ duration: "30s", rps: 1 }, | |
{ duration: "30s", rps: 10 }, | |
{ duration: "30s", rps: 100 }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//server index | |
const express = require('express'); | |
let app = express(); | |
const port = 4540; | |
const db = require('../db'); | |
app.use(express.urlencoded({ extended: true })); | |
app.use(express.json()); | |
app.use(express.static('./dist')); |