Skip to content

Instantly share code, notes, and snippets.

package main
import (
"sync"
"github.com/valyala/fasthttp"
)
func main() {
mutex := &sync.Mutex{}
*** Go 1.5.3
**** GOGC=100
Threads Conns Reqs/s Speed Avg Lat Max Lat
1 1 2574.66 372.12KB 385.30us 1.71ms
2 2 5475.29 791.35KB 1.70ms 203.90ms
4 4 10335.02 1.46MB 1.05ms 202.41ms
8 8 21804.02 3.08MB 701.24us 202.95ms
16 16 44796.47 6.32MB 358.30us 6.26ms
@kostya-sh
kostya-sh / fortune-m4_10xlarge.txt
Last active January 16, 2016 12:46
go1.6beta2 vs go1.5.3 benchmarks
*** Go 1.5.3
**** default GOGC
2 2 3241.74 4.44MB 615.73us 2.48ms
4 4 6134.48 8.41MB 652.05us 2.14ms
8 8 11127.30 15.25MB 719.22us 4.48ms
16 16 18087.35 24.79MB 0.89ms 6.70ms
32 32 24898.86 34.12MB 1.32ms 8.37ms
64 64 30284.69 41.50MB 2.34ms 13.54ms
@kostya-sh
kostya-sh / group.java
Created May 18, 2015 07:51
print parquet schema
sb.append(indent)
.append(getRepetition().name().toLowerCase())
.append(" group ")
.append(getName())
.append(getOriginalType() == null ? "" : " (" + getOriginalType() +")")
.append(getId() == null ? "" : " = " + getId())
.append(" {\n");
membersDisplayString(sb, indent + " ");
sb.append(indent)
.append("}");
import java.io.File;
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericData;
import org.apache.avro.generic.GenericRecord;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import parquet.column.ParquetProperties.WriterVersion;
import parquet.hadoop.ParquetWriter;