Skip to content

Instantly share code, notes, and snippets.

View vschiavoni's full-sized avatar
😑
^-v-^

Valerio Schiavoni vschiavoni

😑
^-v-^
View GitHub Profile
require "rubygems"
require "tokyocabinet"
require "benchmark"
include TokyoCabinet
records = 1000000
hdb = HDB::new # Hash database; acts as a key value store
hdb.open("casket.hdb", HDB::OWRITER | HDB::OCREAT)
package ch.usi.paxosfs.partitioning;
import com.google.common.collect.Sets;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
/**
* This partitioning oracle will partition the path into the given number n (up to 8) of partitions. The partitioning works like this:
local host, port = "10.0.13.3", 20000
local socket = require("socket")
client = socket.tcp()
client:settimeout(100)
client:connect(host, port)
payload=string.rep("a",16*1024*1024)
payload=payload.."\n"
--print(payload)
for i=1,10 do