Understanding Little’s Law

package mainimport (
"github.com/gin-gonic/gin"
"net/http"
"time"
)
func main() {
router := gin.Default()
router.GET("/", runLittleLawTest)
router.Run("localhost:8080")
}
// getAlbums responds with the list of all albums as JSON.
func runLittleLawTest(c *gin.Context) {
// Calling Sleep method
time.Sleep(100 * time.Millisecond)
c.JSON(http.StatusOK, gin.H{
"code" : http.StatusOK,
})
}
Summary:Total: 10.4566 secsSlowest: 0.1124 secsFastest: 0.1003 secsAverage: 0.1035 secsRequests/sec: 95.6334

Finding response time

Applications

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store