Skip to content

Test different ways to do the same thing in Go in order to compare with other frameworks

Notifications You must be signed in to change notification settings

jpcyrenne/go-rest-api-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

go-rest-api-benchmark

I decided to see how GO would compare to this post : https://medium.com/@mihaigeorge.c/web-rest-api-benchmark-on-a-real-life-application-ebb743a5d7a3

I also wanted to learn more about GO by doing things in different ways. This first example of code is to test Fobonacci as (1) a regular loop, (2) as a recursive fucntion and (3) as a go routine (try to profit from multi processors).

Seems to give wrong numbers around the 95th number. Not sure if it's a uint64 issue (bigger than unsigned 64 bit)? I will ty to understand. Compared with : http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Fibonacci/fibtable.html

How To

You need to have Golang insalled and set up on your machine

  1. Download the code and cd into go-rest-api-benchmark
  2. Run : go run main.go
  3. Open your browser and call the doffeent routes.

ex :

You'll get:

  • the number (20th here) in your browser
  • and the time it took in your shell (µs = microseconds).

About

Test different ways to do the same thing in Go in order to compare with other frameworks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages