This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #servers %keys moved to a new bucket | |
| 2 48.64999 | |
| 3 36.77834 | |
| 4 23.90582 | |
| 5 19.63112 | |
| 6 16.63258 | |
| 7 14.65024 | |
| 8 11.11595 | |
| 9 10.38118 | |
| 10 8.94454 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package blog; | |
| import com.google.caliper.SimpleBenchmark; | |
| import java.util.BitSet; | |
| public class BitSetBenchmark extends SimpleBenchmark{ | |
| private BitSet bitSet; | |
| @Override | |
| protected void setUp() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'sinatra' | |
| require 'redis' | |
| require 'json' | |
| require 'date' | |
| class String | |
| def &(str) | |
| result = '' | |
| result.force_encoding("BINARY") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.concurrent.TimeUnit; | |
| /** | |
| * This is licensed under AGPL 3.0. http://www.gnu.org/licenses/agpl-3.0.html | |
| * @author Chandra Patni | |
| */ | |
| public class RateLimit { | |
| int rate; | |
| String unit; | |
| TimeUnit limit; |