GitXplorerGitXplorer
u

cozgo

public
139 stars
11 forks
1 issues

Commits

List of commits on branch master.
Verified
d33f1dc723ec035e65022331b6677f5013da596a

Merge pull request #4 from thechampagne/master

uurjitbhatia committed 3 months ago
Verified
ee7660fbb207d6f0c9468a4a599ed6c9a44e47b0

Merge pull request #2 from jcalabro/master

uurjitbhatia committed 3 months ago
Verified
be997fa93079b9d6e31cddfd89bcab6dd772a6d4

fix memory leak

tthechampagne committed 3 months ago
Verified
4f30a6a37b0f7e2b78f14bbc3d280804e542909c

Update README.md

jjcalabro committed 2 years ago
Unverified
cd9e1ecd80ee24fd7173c2fa02b5f03843c1b2f8

Update readme

uurjitbhatia committed 3 years ago
Verified
8e482eb35875a3d511aa9b3e10f2027a34799de8

Merge pull request #1 from s0kil/master

uurjitbhatia committed 5 years ago

README

The README file for this repository.

coz-go

Coz profiler Golang wrapper.

This is a golang wrapper around the Coz profiler here: https://github.com/plasma-umass/coz

Code Usage {#code-usage}

Coz Call Equivalent CozGo Call Description
COZ_BEGIN("name") cozgo.Begin("name") Begin a latency profiling block identified by the name
COZ_END("name") cozgo.End("name") End a latency profiling block identified by the name
COZ_PROGRESS() cozgo.Progress() Specify a progress point within a block of work
COZ_PROGRESS() cozgo.NamedProgress("name") Specify a named progress point within a block of work

For background on causal profiling, see

Paper: http://www.sigops.org/s/conferences/sosp/2015/current/2015-Monterey/printable/090-curtsinger.pdf

Blog: https://morsmachine.dk/causalprof

Running/Usage

  • Install Coz: https://github.com/plasma-umass/coz
    • For OS X users, the easiest way is to run a docker image with linux and install Coz
    • 'apt update; apt install coz-profiler'
  • Import cozgo: import "github.com/urjitbhatia/cozgo"
  • Call the Coz wrappers in your application
  • Build your go binary with the flags: -ldflags=-compressdwarf=false -gcflags=all="-N -l" so that Coz can identify the debug symbols properly
  • Run your application with Coz: coz run --- yourGoBinary
  • Let the application run for a while (you might want to run some load test etc, so that the profiler can pick up usage data)
  • By default, Coz will create a file called profile.coz
  • Use the Coz viewer to analyze the profile