fdcount

package
v0.0.0-...-fd97e0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2016 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

README

fdcount Travis CI Status Coverage Status GoDoc

package fdcount contains provides utility functions for counting file descriptors used by the current process.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitUntilNoneMatch

func WaitUntilNoneMatch(match string, timeout time.Duration) error

WaitUntilNoneMatch waits until no file descriptors match the given string, or the timeout is hit.

Types

type Counter

type Counter struct {
	// contains filtered or unexported fields
}

Counter memorizes the number of file descriptors and compare them.

func Matching

func Matching(match string) (int, *Counter, error)

Matching returns a count of the file descriptors matching the given string (not a regex). Also returns a Counter that can be used to check the delta of file descriptors after this point.

Currently only works on systems that have the lsof command available.

see https://groups.google.com/forum/#!topic/golang-nuts/c0AnWXjzNIA

func (*Counter) AssertDelta

func (c *Counter) AssertDelta(expected int) error

AssertDelta asserts that the number of file descriptors added/removed since Counter was created equals the given number.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL