Code Monkey home page Code Monkey logo

lb's Introduction

lb - LDAP benchmarking tool like an Apache Bench

Build Status

lb is simple benchmarking tool for LDAP Server. This tool is designed to allow perform by command line such as Apache Bench.

Build

Build requirements

  • Golang 1.4 or later

for Debian or Ubuntu

# apt-get install golang

Set GOPATH

$ export GOPATH=~/go
$ export PATH=$GOPATH/bin:$PATH

Install lb command

$ go get github.com/hamano/lb

Usage

lb have setup sub-command that preparing for benchmarking.

Setup subcommand

  • Add base entry
$ lb setup base -b 'dc=example,dc=com' ldap://localhost/

This command add base entry.

  • Add single entry
$ lb setup person --cn 'test' ldap://localhost/
  • Add range entries
$ lb setup person --cn 'user%d' --last 10 ldap://localhost/

ADD Benchmarking

$ lb add -c 10 -n 1000 ldap://localhost/

This command add following entries 1000 times with 10 threads.

dn: cn=${THREADID}-${COUNT},dc=example,dc=com
cn: ${THREADID}-${COUNT}
sn: sn
userPassword: secret

Use --uuid option if you want to use UUID for cn.

$ lb add -c 10 -n 1000 --uuid ldap://localhost/
dn: cn=${UUID},dc=example,dc=com
cn: ${UUID}
sn: sn
userPassword: secret

DELETE Benchmarking

$ lb delete -c 10 -n 1000 ldap://localhost/

This command make delete request with following DNs:

cn=0-0,dc=example,dc=com
...
cn=9-999,dc=example,dc=com

BIND Benchmarking

  • BIND Benchmarking with single entry
$ lb bind -c 10 -n 1000 -D cn=user,dc=example,dc=com -w secret ldap://localhost/

This command make 1000 times bind request with 10 threads.

  • BIND Benchmarking with ranged random entries
$ lb bind -D 'cn=user%d,dc=example,dc=com' -w secret --last 10 ldap://localhost/

SEARCH Benchmarking

  • Search Benchmarking with random filters
$ lb search -c 10 -n 1000 -a "(cn=user%d)" --last 1000 -s sub ldap://localhost/

This command make 1000 times search request with following random filters:

(cn=user1)
...
(cn=user1000)

MODIFY Benchmarking

$ lb modify -c 10 -n 1000 --attr sn --value modified ldap://localhost/

This command make modify request with following DNs:

cn=0-0,dc=example,dc=com
...
cn=9-999,dc=example,dc=com

TODO

  • modrdn benchmarking

lb's People

Contributors

hamano avatar miguelwhite avatar

Watchers

 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.