Debian Codegraph @

debian/control

raw
1 Source: golang-github-hodgesds-perf-utils
2 Maintainer: Debian Go Packaging Team <[email protected]>
3 Uploaders:
4 Benjamin Drung <[email protected]>,
5 Guillem Jover <[email protected]>,
6 Section: golang
7 Build-Depends:
8 debhelper-compat (= 13),
9 dh-sequence-golang,
10 golang-any,
11 golang-github-stretchr-testify-dev (>= 1.3),
12 golang-go.uber-multierr-dev (>= 1),
13 golang-golang-x-sys-dev,
14 Standards-Version: 4.7.4
15 Vcs-Browser: https://salsa.debian.org/go-team/packages/golang-github-hodgesds-perf-utils
16 Vcs-Git: https://salsa.debian.org/go-team/packages/golang-github-hodgesds-perf-utils.git
17 Homepage: https://github.com/hodgesds/perf-utils
18 XS-Go-Import-Path: github.com/hodgesds/perf-utils
19
20 Package: golang-github-hodgesds-perf-utils-dev
21 Architecture: all
22 Multi-Arch: foreign
23 Depends:
24 dh-golang,
25 golang-github-stretchr-testify-dev (>= 1.3),
26 golang-go.uber-multierr-dev (>= 1),
27 golang-golang-x-sys-dev,
28 ${misc:Depends},
29 Description: Perf Utilities for Go (library)
30 This package is a Go library for interacting with the perf subsystem in Linux.
31 This library allows you to do things like see how many CPU instructions a
32 function takes (roughly), profile a process for various hardware events, and
33 other interesting things. Note that because the Go scheduler can schedule a
34 goroutine across many OS threads it becomes rather difficult to get an exact
35 profile of an individual goroutine. However, a few tricks can be used; first a
36 call to runtime.LockOSThread (https://golang.org/pkg/runtime/#LockOSThread) to
37 lock the current goroutine to an OS thread. Second a call to
38 unix.SchedSetaffinity
39 (https://godoc.org/golang.org/x/sys/unix#SchedSetaffinity), with a CPU set
40 mask set. Note that if the pid argument is set 0 the calling thread is used
41 (the thread that was just locked). Before using this library you should
42 probably read the perf_event_open man page which this library uses heavily.
43 See the kernel guide https://perf.wiki.kernel.org/index.php/Tutorial for a
44 tutorial how to use perf and some of the limitations.
45 .
46 If you are looking to interact with the perf subsystem directly with
47 perf_event_open syscall than this library is most likely for you. A large
48 number of the utility methods in this package should only be used for testing
49 and/or debugging performance issues. This is due to the nature of the Go
50 runtime being extremely tricky to profile on the goroutine level, with the
51 exception of a long running worker goroutine locked to an OS thread.
52 Eventually this library could be used to implement many of the features of
53 perf but in pure Go. Currently this library is used in node_exporter
54 (https://github.com/prometheus/node_exporter) as well as perf_exporter
55 (https://github.com/hodgesds/perf_exporter), which is a Prometheus exporter
56 for perf related metrics.