This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ go tool pprof pprof/heap.3.pprof | |
Local symbolization failed for main: open /tmp/go-build598947513/b001/exe/main: no such file or directory | |
Some binary filenames not available. Symbolization may be incomplete. | |
Try setting PPROF_BINARY_PATH to the search path for local binaries. | |
File: main | |
Type: inuse_space | |
Time: Jul 30, 2018 at 6:11pm (UTC) | |
Entering interactive mode (type "help" for commands, "o" for options) | |
(pprof) svg | |
Generating report in profile002.svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[14808.063890] main invoked oom-killer: gfp_mask=0x24000c0, order=0, oom_score_adj=0 [7/972] | |
[14808.063893] main cpuset=34186d9bd07706222bd427bb647ceed81e8e108eb653ff73c7137099fca1cab6 mems_allowed=0 | |
[14808.063899] CPU: 2 PID: 11345 Comm: main Not tainted 4.4.0-130-generic #156-Ubuntu | |
[14808.063901] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 | |
[14808.063902] 0000000000000286 ac45344c9134371f ffff8800b8727c88 ffffffff81401c43 | |
[14808.063906] ffff8800b8727d68 ffff8800b87a5400 ffff8800b8727cf8 ffffffff81211a1e | |
[14808.063908] ffffffff81cdd014 ffff88006a355c00 ffffffff81e6c1e0 0000000000000206 | |
[14808.063911] Call Trace: | |
[14808.063917] [<ffffffff81401c43>] dump_stack+0x63/0x90 | |
[14808.063928] [<ffffffff81211a1e>] dump_header+0x5a/0x1c5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start-dev-stack: | |
# docker-compose | |
start-functional-test-stack: | |
# clean env that can be brought up in CI for functional tests | |
# this includes all inter-process dependencies required to execute functional tests | |
# usually includes configuring those dependencies | |
lint: | |
# run static anlysis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func main() { | |
flag1 := flag.TYPE.... | |
flagn := ... | |
// setup signal channels to hook into ExitChan | |
exitChan := make(chan int) | |
sourceService := &Source{ | |
NumGoRoutineConncurreny: X, | |
ExitChan: exitChan, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func URLBody(url string) (string, error) { | |
resp, err := http.Get(url) | |
if err != nil { | |
return "", err | |
} | |
defer resp.Body.Close() | |
body, err := ioutil.ReadAll(resp.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func URLBody(url string) (string, error) { | |
resp, err := http.Get(url) | |
if err != nil { | |
return "", err | |
} | |
defer resp.Body.Close() | |
body, err := ioutil.ReadAll(resp.body) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "net/http" | |
func URLBody(url string) (string, error) { | |
resp, err := http.Get(url) | |
if err != nil { | |
return "", err | |
} | |
defer resp.Body.Close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func URLBody(url string) (string, error) { | |
resp, err := http.Get(url) | |
if err != nil { | |
return "", err | |
} | |
defer resp.Body.Close() | |
body, err := ioutil.ReadAll(resp.body) | |
if err != nil { | |
return "", err | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type LogReader struct { | |
Events chan *Event | |
} | |
func (lr *LogReader) Consume() { | |
for event := range lr.Events { | |
e, err := json.Marshal(event) | |
if err != nil { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('chai').assert; | |
var resources = require('./resources.js'); | |
var sinon = require('sinon'); | |
describe('resources.js', function() { | |
describe('getData()', function() { | |
it('calls makeRequest with a built request', function() { | |
var makeRequest = sinon.spy(); | |
var resource = 'a resource'; |