Skip to content

Instantly share code, notes, and snippets.

View yosssi's full-sized avatar

Keiji Yoshida yosssi

View GitHub Profile
@yosssi
yosssi / go-nginx.md
Last active April 11, 2024 22:07
Go networking performance vs Nginx

1. Nginx

$ wrk -t12 -c400 -d2s http://127.0.0.1:8080
Running 2s test @ http://127.0.0.1:8080
  12 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     7.71ms    3.16ms  23.05ms   69.17%
    Req/Sec     3.44k     1.98k    7.80k    58.22%
  63697 requests in 2.00s, 17.86MB read
@yosssi
yosssi / go-concurrency-patterns.md
Last active September 27, 2018 04:53
Go Concurrency Patterns

Go Concurrency Patterns

Generator: function that returns a channel

package main

import (
	"fmt"
	"math/rand"
type Duration int64
  • gologger.GetLoggerのテスト
  • goes#mainの続き
@yosssi
yosssi / Plan.md
Last active January 3, 2016 08:09
  • goパッケージディレクトリへのcdを楽にできるツール

  • reflect

  • how to list a struct

  • how to use map on goyaml

  • `` of struct's field

  • Homepage

  • Try Go web template engine Amber

s := string(byteArray[])

@yosssi
yosssi / gofmt
Last active January 3, 2016 00:19
Command to format all the .go file in current directory and sub directories
gofmt -w `find . | grep "\.go"`