superscriptjs / superscript

A dialogue engine for creating chat bots
http://superscriptjs.com
MIT License
1.65k stars 209 forks source link

disable versioning in mongoDB,improved performance. #406

Closed socool closed 5 years ago

socool commented 5 years ago

Fixed error "No matching document found for id" when running on production by disable versioning and save function improvement.

Description

Motivation and Context

Because application is too slow to run in production (Apdex:7.22),then we need to fixed performance issued by improve save function and disable versioning.

How Has This Been Tested?

Initial bot

bot-init myBotName --clients express

Setup bot

cd myBotName
npm install
parse
npm run build
npm run start-express

Run jmeter (5.0 r1840935) using this command

./jmeter -n -t [YOUR_DIRECTORY]/superscript-performance.jmx] -l [YOUR_DIRECTORY]/superscript-5000.csv-e -o [YOUR_DIRECTORY]/superscript-5000-report

superscript-performance.jmx

The code is tested with existing test cases. All test cases pass.

Screenshots (if appropriate):

Before Improve

After Improve

Types of changes

Checklist:

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.07%) to 80.624% when pulling 6eba919d598f85967a6cf82bcad4592e786cb721 on socool:master into 37f2be9c149112db924f817faa3726ed2c648c27 on superscriptjs:master.