Code Monkey home page Code Monkey logo

go-session-store-benchmarks's Introduction

Go session store benchmarks

This benchmark suite aims to compare the performance of session stores which implements the gorilla/sessions package's Store interface in Go.

Tested session stores

Results

Get - returns a cached session

BenchmarkCookieStore_Get	            20000000	      99.0 ns/op	       0 B/op	       0 allocs/op
BenchmarkFilesystemStore_Get	        20000000	       107 ns/op	       0 B/op	       0 allocs/op
BenchmarkBoltstore_Get	                20000000	       109 ns/op	       0 B/op	       0 allocs/op
BenchmarkGorillaSessionsMemcache_Get	20000000	       109 ns/op	       0 B/op	       0 allocs/op
BenchmarkMongostore_Get	                20000000	       117 ns/op	       0 B/op	       0 allocs/op
BenchmarkMysqlstore_Get	                20000000	       111 ns/op	       0 B/op	       0 allocs/op
BenchmarkPgstore_Get	                20000000	       144 ns/op	       0 B/op	       0 allocs/op
BenchmarkRedistore_Get	                20000000	       130 ns/op	       0 B/op	       0 allocs/op

New - creates and return a new session

BenchmarkCookieStore_New	             5000000	       450 ns/op	     180 B/op	       3 allocs/op
BenchmarkFilesystemStore_New	         5000000	       430 ns/op	     180 B/op	       3 allocs/op
BenchmarkBoltstore_New	                10000000	       287 ns/op	     131 B/op	       2 allocs/op
BenchmarkGorillaSessionsMemcache_New	 5000000	       336 ns/op	     180 B/op	       3 allocs/op
BenchmarkMongostore_New	                 5000000	       395 ns/op	     180 B/op	       3 allocs/op
BenchmarkMysqlstore_New	                 5000000	       427 ns/op	     180 B/op	       3 allocs/op
BenchmarkPgstore_New	                10000000	       301 ns/op	     131 B/op	       2 allocs/op
BenchmarkRedistore_New	                 5000000	       320 ns/op	     131 B/op	       2 allocs/op

Save - persists session to the underlying store implementation

BenchmarkCookieStore_Save	              100000	     22740 ns/op	    4101 B/op	      50 allocs/op
BenchmarkFilesystemStore_Save	           10000	    238869 ns/op	    6955 B/op	      81 allocs/op
BenchmarkBoltstore_Save	                    5000	    361275 ns/op	   25184 B/op	     116 allocs/op
BenchmarkGorillaSessionsMemcache_Save	   10000	    129865 ns/op	    7098 B/op	      91 allocs/op
BenchmarkMongostore_Save	               10000	    195949 ns/op	    9938 B/op	     144 allocs/op
BenchmarkMysqlstore_Save	               10000	    342614 ns/op	    6272 B/op	      97 allocs/op
BenchmarkPgstore_Save	                    5000	    577048 ns/op	    9437 B/op	     134 allocs/op
BenchmarkRedistore_Save	                   10000	    150446 ns/op	    5476 B/op	      68 allocs/op

go-session-store-benchmarks's People

Contributors

yosssi avatar

Stargazers

 avatar OKAMURA Naoki aka nyarla / kalaclista avatar Daniel Blanco avatar takafumi tsuchida avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.