Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/dalent/db_benchmark

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/dalent/db_benchmark

  • v0.0.0-20150407090625-23c83aa00a66
  • Source
  • Go
  • Socket score

Version published
Created
Source

db_benchmark

测试redis和mongo等的速度

go get github.com/dalent/db_benchmark

用法 -d数据库 ,-u 数据库 url -t 线程数量

 go run benchmark.go -d mongo -u  mgo1:8888 -t 2

表示用两个线程,每个线程插入和读取1万次,的时间结果为

mode w
threads: 2
per thread: 10000
total time:3.879012986s

mode r
threads: 2
per thread: 10000
total time:3.338706411s

同样可以测试redis,因为redis的url不包括passwd信息所以职能控制台提供例如

go run benchmark.go --d redis -u  mgo2:6379 -t 2 -p passwd 

结果和上边的类似。

FAQs

Package last updated on 07 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc