Discover Packages
github.com/efficientgo/examples
pkg
profile
fd
package
Version:
v0.0.0-...-3b473a0
Opens a new window with list of versions in this module.
Published: Jan 7, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
ExampleHTTP is an example of HTTP exposure of Go profiles.
Read more in "Efficient Go"; Example 9-5.
Write saves the profile of the currently open file descriptors in to file in pprof format.
File is a wrapper on os.File that tracks file descriptor lifetime.
Open opens file and tracks it in the `fd` profile`.
NOTE(bwplotka): We could use finalizers here, but explicit Close is more reliable and accurate.
Unfortunately it also changes type which might be dropped accidentally.
Close closes files and updates profile.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.