Skip to content

Instantly share code, notes, and snippets.

View jiajunhuang's full-sized avatar
😎
Coding...

Jiajun Huang jiajunhuang

😎
Coding...
View GitHub Profile
@jiajunhuang
jiajunhuang / benchmark.sh
Created January 7, 2018 03:37
tornado, flask benchmark
jiajun@idea ~: wrk -c 2048 -d 30 -t 2 http://127.0.0.1:10086 # tornado with IOLoop
Running 30s test @ http://127.0.0.1:10086
2 threads and 2048 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 441.69ms 82.24ms 770.09ms 87.87%
Req/Sec 1.08k 507.69 2.29k 58.54%
64035 requests in 30.08s, 12.64MB read
Socket errors: connect 1029, read 0, write 0, timeout 0
Requests/sec: 2128.79
Transfer/sec: 430.33KB
package main
import (
"flag"
"fmt"
"net"
"os"
"os/exec"
"os/signal"
"syscall"
#include <stdio.h>
#include <stdlib.h>
#include "area.h"
float shared = 1.0;
float calc_area(pSquare s) {
return s->length * s->width + shared;
}
@jiajunhuang
jiajunhuang / tmux.md
Created July 30, 2016 01:46 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@jiajunhuang
jiajunhuang / sh
Created December 16, 2015 03:53
execute this after create a new Ubuntu droplet in digitalocean
apt-get purge -y accountsservice aptitude apport python3-gi software-properties-common tasksel update-manager-core ubuntu-release-upgrader-core && apt-get -y autoremove