We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much
| FILENAME=$(basename $(pwd)) | |
| go test -run=. -bench=. -cpuprofile=cpu.out -benchmem -memprofile=mem.out -trace trace.out | |
| go tool pprof -pdf $FILENAME.test cpu.out > cpu.pdf && open cpu.pdf | |
| go tool pprof -pdf --alloc_space $FILENAME.test mem.out > alloc_space.pdf && open alloc_space.pdf | |
| go tool pprof -pdf --alloc_objects $FILENAME.test mem.out > alloc_objects.pdf && open alloc_objects.pdf | |
| go tool pprof -pdf --inuse_space $FILENAME.test mem.out > inuse_space.pdf && open inuse_space.pdf | |
| go tool pprof -pdf --inuse_objects $FILENAME.test mem.out > inuse_objects.pdf && open inuse_objects.pdf | |
| go tool trace trace.out | |
| go-torch $FILENAME.test cpu.out -f ${FILENAME}_cpu.svg && open ${FILENAME}_cpu.svg |
We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
I am catorpilor on github.
I am chesh (https://keybase.io/chesh) on keybase.
I have a public key ASAhPV98Ioje1It3Sf76IndiXikf-viqwkrgNPcYnXzdBwo
| 04ca5837a276d784764b9d561bf2b8b8947f0b9ff6d383518e2aaea272d5dd2a5a93af6b6caca2decfff0b60955e62aba6b8e7595a7831daa69d8ceb322a389539 |
| 04ca5837a276d784764b9d561bf2b8b8947f0b9ff6d383518e2aaea272d5dd2a5a93af6b6caca2decfff0b60955e62aba6b8e7595a7831daa69d8ceb322a389539 |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "os" | |
| "strconv" | |
| "time" | |
| ) |
| // getComponent is a function that returns a promise for a component | |
| // It will not be called until the first mount | |
| function asyncComponent(getComponent) { | |
| return class AsyncComponent extends React.Component { | |
| static Component = null; | |
| state = { Component: AsyncComponent.Component }; | |
| componentWillMount() { | |
| if (!this.state.Component) { | |
| getComponent().then(Component => { |
| FROM golang:alpine AS build | |
| ADD . /go/src/github.com/my/project | |
| WORKDIR /go/src/github.com/my/project | |
| RUN go build -o /mybinary ./cmd/mybinary | |
| FROM alpine:latest |