Skip to content

Instantly share code, notes, and snippets.

package main
import (
"errors"
"log"
"net/http"
_ "net/http/pprof"
"time"
"github.com/afex/hystrix-go/hystrix"
# Ring the bell if any background window rang a bell
#set -g bell-action any
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
# Keep your finger on ctrl, or don't
bind-key ^D detach-client
# Create splits and vertical splits
package main
import (
"fmt"
"github.com/couchbase/gocb"
"sync"
)
func main() {
2018-05-24T09:22:48.546-07:00 [Info] DCPT[eventing:172.23.104.93:8096_172.23.104.23:11210_worker_bucket_op_complex_function1_1/0] DCP-socket -> eventing blocked 11.84626268s (0.692551%)
2018-05-24T09:23:00.215-07:00 [Info] DCPT[eventing:172.23.104.93:8096_172.23.104.23:11210_worker_bucket_op_complex_function1_1/0] DCP-socket -> eventing blocked 11.667332646s (0.694686%)
2018-05-24T09:23:06.112-07:00 [Info] DCPT[eventing:172.23.104.93:8096_172.23.104.23:11210_worker_bucket_op_complex_function1_1/0] DCP-socket -> eventing blocked 5.894648761s (0.695754%)
2018-05-24T09:23:12.113-07:00 [Info] DCPT[eventing:172.23.104.93:8096_172.23.104.23:11210_worker_bucket_op_complex_function1_1/0] DCP-socket -> eventing blocked 6.00121452s (0.696833%)
2018-05-24T09:23:24.054-07:00 [Info] DCPT[eventing:172.23.104.93:8096_172.23.104.23:11210_worker_bucket_op_complex_function1_1/0] DCP-socket -> eventing blocked 11.940204438s (0.698957%)
2018-05-24T09:23:35.967-07:00 [Info] DCPT[eventing:172.23.104.93:8096_172.23.104.23:11210_wor
goroutine profile: total 1274
140 @ 0x4321fa 0x42cabb 0x42c219 0x584928 0x584994 0x5861d1 0x597780 0x89b87c 0x89bedc 0xa63a75 0xa63b4a 0xa784c9 0x463451
# 0x42c218 net.runtime_pollWait+0x58 /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/runtime/netpoll.go:160
# 0x584927 net.(*pollDesc).wait+0x37 /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/net/fd_poll_runtime.go:73
# 0x584993 net.(*pollDesc).waitRead+0x33 /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/net/fd_poll_runtime.go:78
# 0x5861d0 net.(*netFD).Read+0x1a0 /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/net/fd_unix.go:243
# 0x59777f net.(*conn).Read+0x6f /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/net/net.go:173
# 0x89b87b bufio.(*Reader).fill+0x10b /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/bufio/bufio.go:97
# 0x89bedb bufio.(*Reader).Read+0x1bb /home/couchbase/.cbdepscache/exploded/x86_64/go-1.7.6/go/src/bufio/bufio.go:209
#
@abhi-bit
abhi-bit / json_parse.cc
Created October 18, 2017 04:17
parse json using v8::json::parse
#include <cassert>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <streambuf>
#include <string>
#include <thread>
#include <unistd.h>
# Ring the bell if any background window rang a bell
#set -g bell-action any
# Default termtype. If the rcfile sets $TERM, that overrides this value.
set -g default-terminal screen-256color
# Keep your finger on ctrl, or don't
bind-key ^D detach-client
# Create splits and vertical splits
@abhi-bit
abhi-bit / a.go
Last active January 29, 2017 15:37
package a
import (
"log"
"time"
"github.com/abhi-bit/tools/eventing/circular_dependency/b"
"github.com/abhi-bit/tools/eventing/circular_dependency/c"
)
@abhi-bit
abhi-bit / client.c
Created November 7, 2016 05:32
Go to C communication
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <uv.h>
uv_loop_t *loop;
void on_connect(uv_connect_t *req, int status);
void on_write_end(uv_write_t *req, int status);
void echo_read(uv_stream_t *server, ssize_t nread, const uv_buf_t *buf);
@abhi-bit
abhi-bit / heap_oom.cc
Created September 23, 2016 10:40
Allocation failed - Javascript heap out of memory
#include <cassert>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include <include/v8.h>