Skip to content

Instantly share code, notes, and snippets.

View darnaut's full-sized avatar

Davi Arnaut darnaut

  • San Francisco, CA
View GitHub Profile
root@i-08807ccee318d56f9:~# sysbench --test=cpu --cpu-max-prime=400 run
sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 1
Doing CPU performance benchmark
Threads started!
Done.
@darnaut
darnaut / gist:1d39b74a2a3311fb795e
Created August 28, 2014 04:27
GDB command implementing malloc_stats()
define my_malloc_stats
set $in_use = mp_.mmapped_mem
set $system = mp_.mmapped_mem
set $arena = &main_arena
set $arena_n = 0
# mALLINFo
while $arena
set $system = $system + $arena->system_mem
@darnaut
darnaut / gist:7682045
Last active December 29, 2015 14:09
Consistent read with savepoints.
# Setup: t1, t2, t3 (a INT PRIMARY KEY, b INT) with rows (1,1),(2,2)
# con1
mysql> SELECT @@version;
+-----------------------------------+
| @@version |
+-----------------------------------+
| 5.5.32-dev-valgrind-max-debug-log |
+-----------------------------------+
1 row in set (0.00 sec)
@darnaut
darnaut / gist:6529187
Created September 11, 2013 20:16
Run a MySQL test case under various different variations that may affect its behavior: $ ~/testall.sh 1st
#!/bin/bash -xe
./mtr --check $@
./mtr --ps-protocol $@
#./mtr --cursor-protocol $@
#./mtr --view-protocol $@
#./mtr --sp-protocol $@
./mtr --ps-protocol --mysqld=--binlog-format=mixed $@
./mtr --mysqld=--binlog-format=row $@
./mtr --ps-protocol --mysqld=--binlog-format=row $@