- run sysbench insert for at least 12 hours
- status: ✅
- pre split regions
| package main | |
| import "testing" | |
| var allowList = []string{ | |
| "create", | |
| "cancel", | |
| "update", | |
| } |
| package main | |
| import ( | |
| "testing" | |
| "strconv" | |
| "sync" | |
| ) | |
| func BenchmarkCreateGoroutine(b *testing.B) { | |
| nums := []int { |
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| _ "net/http/pprof" | |
| "time" | |
| "github.com/pingcap/log" | |
| "go.etcd.io/etcd/clientv3" |
| #!/bin/bash | |
| # This script prints out all of your Redis keys and their size in a human readable format | |
| # Inspired by https://gist.github.com/epicserve/5699837 | |
| # Copyright 2015 amyangfei | |
| # License: http://www.apache.org/licenses/LICENSE-2.0 | |
| human_size() { | |
| awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print sum,"bytes"; } ' | |
| } |
| /* Dictionary reuse scheme to save calls to malloc, free, and memset */ | |
| // Dict对象缓冲池 | |
| #ifndef PyDict_MAXFREELIST | |
| #define PyDict_MAXFREELIST 80 | |
| #endif | |
| static PyDictObject *free_list[PyDict_MAXFREELIST]; | |
| static int numfree = 0; | |
| PyObject * | |
| PyDict_New(void) |
| from wsgiref.simple_server import make_server | |
| class AppClass: | |
| def __call__(self,environ, start_response): | |
| status = '200 OK' | |
| response_headers = [('Content-type', 'text/plain')] | |
| start_response(status, response_headers) | |
| return ["hello world!"] |
| import io, cStringIO, StringIO | |
| import time | |
| import functools | |
| from memory_profiler import memory_usage | |
| def data_gen(): | |
| return 'datadata' * 100 | |
| times = 1000000 | |
| dflt_interval = 0.5 |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import json | |
| import sys | |
| import re | |
| from tornado.httputil import url_concat | |
| from tornado.httpclient import AsyncHTTPClient | |
| from tornado.ioloop import IOLoop |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import hashlib | |
| import time | |
| import functools | |
| from memory_profiler import memory_usage | |
| def print_timing(func): |