golang.org rate limiter:
rl := rate.NewLimiter(1000000, 1)
last := time.Now()
for i := 0; i < 10; i++ {
rl.Wait(context.Background())
cur := time.Now()
fmt.Println("last", cur.Sub(last))
last = cur
golang.org rate limiter:
rl := rate.NewLimiter(1000000, 1)
last := time.Now()
for i := 0; i < 10; i++ {
rl.Wait(context.Background())
cur := time.Now()
fmt.Println("last", cur.Sub(last))
last = cur
cd repro && CUSTOMIZE_DIFF_PANIC=1 terraform destroy | |
2023-01-09T10:52:39.474-0800 [INFO] Terraform version: 1.2.9 | |
2023-01-09T10:52:39.474-0800 [DEBUG] using github.com/hashicorp/go-tfe v1.0.0 | |
2023-01-09T10:52:39.474-0800 [DEBUG] using github.com/hashicorp/hcl/v2 v2.12.0 | |
2023-01-09T10:52:39.474-0800 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2 | |
2023-01-09T10:52:39.474-0800 [DEBUG] using github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 | |
2023-01-09T10:52:39.474-0800 [DEBUG] using github.com/zclconf/go-cty v1.11.0 | |
2023-01-09T10:52:39.474-0800 [INFO] Go runtime version: go1.18.1 | |
2023-01-09T10:52:39.474-0800 [INFO] CLI args: []string{"terraform", "destroy"} | |
2023-01-09T10:52:39.474-0800 [TRACE] Stdout is not a terminal |
package elfsym | |
import ( | |
"bytes" | |
"debug/elf" | |
"fmt" | |
"io/ioutil" | |
) | |
type Symbol struct { |
package main | |
import ( | |
"fmt" | |
"runtime" | |
"sync" | |
"time" | |
) | |
func main() { |
"prashant" |
2019/07/22 17:38:58 http2: Transport creating client conn 0xc0000f0000 to 127.0.0.1:34071 | |
2019/07/22 17:38:58 http2: Framer 0xc00011a000: wrote SETTINGS len=18, settings: ENABLE_PUSH=0, INITIAL_WINDOW_SIZE=4194304, MAX_HEADER_LIST_SIZE=10485760 | |
2019/07/22 17:38:58 http2: Framer 0xc00011a000: wrote WINDOW_UPDATE len=4 (conn) incr=1073741824 | |
2019/07/22 17:38:58 http2: Transport encoding header ":authority" = "127.0.0.1:34071" | |
2019/07/22 17:38:58 http2: Transport encoding header ":method" = "POST" | |
2019/07/22 17:38:58 http2: Transport encoding header ":path" = "/drop" | |
2019/07/22 17:38:58 http2: Transport encoding header ":scheme" = "http" | |
2019/07/22 17:38:58 http2: Transport encoding header "content-type" = "application/raw" | |
2019/07/22 17:38:58 http2: Transport encoding header "content-length" = "8388608" | |
2019/07/22 17:38:58 http2: Transport encoding header "accept-encoding" = "gzip" |
Microsoft (R) Windows Debugger Version 10.0.17763.132 AMD64 | |
Copyright (c) Microsoft Corporation. All rights reserved. | |
Loading Dump File [C:\Users\Prashant\Documents\032119-18390-01.dmp] | |
Mini Kernel Dump File: Only registers and stack trace are available | |
WARNING: Whitespace at end of path element | |
Error: Empty Path. |
Close | |
close("user initiated") | |
close | |
sets state to connectionStartClose | |
causes checkExchanges to go to close states | |
readFrames: | |
connectionError if closeNetwork ISNT called |
2018/12/07 18:19:24 h2c: attempting h2c with prior knowledge. | |
2018/12/07 18:19:24 http2: server connection from [::1]:43354 on 0xc42008d860 | |
2018/12/07 18:19:24 http2: Framer 0xc4209dc380: wrote SETTINGS len=24, settings: MAX_FRAME_SIZE=1048576, MAX_CONCURRENT_STREAMS=250, MAX_HEADER_LIST_SIZE=1048896, INITIAL_WINDOW_SIZE=1048576 | |
2018/12/07 18:19:24 http2: server: client [::1]:43354 said hello | |
2018/12/07 18:19:24 http2: Framer 0xc4209dc380: wrote WINDOW_UPDATE len=4 (conn) incr=983041 | |
2018/12/07 18:19:24 http2: Framer 0xc4209dc000: wrote SETTINGS len=0 | |
2018/12/07 18:19:24 http2: Framer 0xc4209dc380: read SETTINGS len=0 | |
2018/12/07 18:19:24 http2: server read frame SETTINGS len=0 | |
2018/12/07 18:19:24 http2: Framer 0xc4209dc380: wrote SETTINGS flags=ACK len=0 | |
2018/12/07 18:19:24 http2: Framer 0xc4209dc000: read SETTINGS len=24, settings: MAX_FRAME_SIZE=1048576, MAX_CONCURRENT_STREAMS=250, MAX_HEADER_LIST_SIZE=1048896, INITIAL_WINDOW_SIZE=1048576 |
package main | |
import ( | |
"fmt" | |
"go.uber.org/zap" | |
"go.uber.org/zap/zapcore" | |
lumberjack "gopkg.in/natefinch/lumberjack.v2" | |
"time" | |
) |