Skip to content

Instantly share code, notes, and snippets.

@roa
Created November 3, 2012 17:53
Show Gist options
  • Save roa/4008117 to your computer and use it in GitHub Desktop.
Save roa/4008117 to your computer and use it in GitHub Desktop.
package main
import (
"github.com/alphazero/Go-Redis"
"log"
"strconv"
"time"
)
func main() {
spec := redis.DefaultSpec().Db(0).Host("localhost").Password("")
client, err := redis.NewSynchClientWithSpec(spec)
if err != nil {
log.Println(err)
}
for i := 0; i < 200000; i++ {
client.Set("key"+strconv.Itoa(i), []byte("value"))
time.Sleep(time.Millisecond * 10)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment