Skip to content

Instantly share code, notes, and snippets.

Shen Li shenli

Block or report user

Report or block shenli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shenli
shenli / time.go
Created Mar 22, 2016
MySQL Time test
View time.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"time"
)
func main() {
@shenli
shenli / time.go
Last active Mar 22, 2016
MySQL Time test
View time.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"time"
)
func main() {
@shenli
shenli / bench_test.go
Last active Aug 15, 2016
Batch bench
View bench_test.go
package tidb
import (
"math/rand"
"testing"
)
var (
totalCount = int64(1000000)
batchSize = int64(2000)
View gist:ae922533e302c3d51146f7769d6fbc82
```
[BEGIN] 2018/1/9 10:07:49
(gdb) thread apply all bt
Thread 75 (LWP 42463):
#0 runtime.futex () at /usr/local/go/src/runtime/sys_linux_amd64.s:439
#1 0x00000000004293f2 in runtime.futexsleep (addr=0x1b13d20 <runtime.mheap_>, val=2, ns=-1)
at /usr/local/go/src/runtime/os_linux.go:45
#2 0x000000000040f721 in runtime.lock (l=0x1b13d20 <runtime.mheap_>) at /usr/local/go/src/runtime/lock_futex.go:102
#3 0x00000000004222ff in runtime.(*mheap).alloc_m (h=0x1b13d20 <runtime.mheap_>, npage=1, spanclass=12 '\f', large=false,
View main.go
// Copyright 2016 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
You can’t perform that action at this time.