This file contains 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
# just wrote them. | |
# ふと思いついたので書いてみた。これでOOPなCじゃんっていう。継承とか出来ないけど。 | |
#include <stdio.h> | |
struct person { | |
double height; | |
double weight; | |
int age; | |
char* name; |
This file contains 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
<?php | |
$redis = new Redis(); | |
$redis->connect("localhost", 6379, 2.5); // 2.5 sec timeout. | |
$redis->flushAll(); | |
$redis->set(uniqid("key_"), uniqid("key_value_1_")); | |
$redis->set(uniqid("key_"), uniqid("key_value_2_")); | |
$redis->set(uniqid("key_"), uniqid("key_value_3_")); |
This file contains 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
<?php | |
/* usage: | |
$ php generate_unique_pair.php 3 | |
48881407 24892092 | |
49164657 48309651 | |
43192279 7385075 | |
*/ | |
define('NUM_PAIRS', $argv[1]); |
This file contains 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
# Kawa's config for MySQL | |
# | |
# Restrictions: | |
# - Debian | |
# - DRAM >= 32GB | |
# - MySQL 5.5 | |
# | |
# Benchmark (Core i7-3820): | |
# $ mysqlslap --no-defaults --create-schema=SLAP --auto-generate-sql --auto-generate-sql-guid-primary --engine=InnoDB --number-int-cols=1 --number-char-cols=1 --concurrency=50 --auto-generate-sql-write-number=10000 --auto-generate-sql-execute-number=10000 --auto-generate-sql-load-type=key --iterations=3 --user=root --password=root --host=localhost --port=3306 | |
# Benchmark |
This file contains 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
<?php | |
# usage: $ php generate_unique_pair.php 10000 > unique_pairs.txt | |
define('NUM_PAIRS', $argv[1]); | |
define('MAX_USERS', 5000 * 10000); | |
$dbname = 'db01'; | |
$host = 'localhost'; | |
$user = 'root'; |
This file contains 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
#!/usr/bin/perl -w | |
# usage : $ ./insert_bench.pl -n 100 -d db01 -t t01 -f ./script/unique_pairs.txt | |
use strict; | |
use MyBench; | |
use Getopt::Std; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
use DBI; | |
use Redis; |
This file contains 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
#!/usr/bin/perl -w | |
# usage : $ ./select_verbose.pl -n 100 -r 1000 -d tw -t t1 -f users.txt | |
use strict; | |
use MyBench; | |
use Getopt::Std; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
use DBI; | |
This file contains 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
#!/usr/bin/perl -w | |
# usage : $ ./select.pl -n 100 -r 1000 -d db01 -t t01 -f users.txt | |
use strict; | |
use MyBench; | |
use Getopt::Std; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
use DBI; | |
This file contains 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
#!/usr/bin/perl -w | |
# usage : $ ./select_t11.pl -n 100 -r 1000 -d tw -t t1 -f users.txt | |
use strict; | |
use MyBench; | |
use Getopt::Std; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
use DBI; | |
This file contains 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
#!/usr/bin/perl -w | |
# usage : $ ./select_t11_verbose.pl -n 100 -r 1000 -d tw -t t1 -f users.txt | |
use strict; | |
use MyBench; | |
use Getopt::Std; | |
use Time::HiRes qw(gettimeofday tv_interval); | |
use DBI; | |
OlderNewer