Skip to content

ada-url/http-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Running benchmarks

  • Install the dependencies
npm install
  • Run the server
npm start
  • Test the server (optional)

If you have curl, you can check that the server returns JSON:

 curl -d '{ "url": "https://www.google.com/hello-world?query=search#value" }'  -H 'Content-Type: application/json'  -X POST localhost:3000/href
  • Run the benchmark in another shell

    • Install autocannon (if needed)

      npm i autocannon -g
    • Start the benchmark (URL parsing):

      autocannon -m 'POST' -H 'content-type=application/json' -b '{ "url": "https://www.google.com/hello-world?query=search#value" }' http://localhost:3000/href
    • Start the benchmark (trivial string return):

      autocannon -m 'POST' -H 'content-type=application/json' -b '{ "url": "https://www.google.com/hello-world?query=search#value" }' http://localhost:3000/simple

About

Simple http benchmark (for ada/node)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published