Skip to content

Commit

Permalink
Fix typos, and initialisms from comments in prometheus#217
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharif Nassar committed May 13, 2016
1 parent 3fe5e7f commit bf88b6e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions collector/filesystem_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import "C"

const (
defIgnoredMountPoints = "^/(dev)($|/)"
defIgnoredFsTypes = "^devfs$"
defIgnoredFSTypes = "^devfs$"
MNT_RDONLY = 0x1
)

Expand All @@ -56,7 +56,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {

device := C.GoString(&mnt[i].f_mntfromname[0])
fstype := C.GoString(&mnt[i].f_fstypename[0])
if c.ignoredFsTypesPattern.MatchString(fstype) {
if c.ignoredFSTypesPattern.MatchString(fstype) {
log.Debugf("Ignoring fs type: %s", fstype)
continue
}
Expand Down
12 changes: 6 additions & 6 deletions collector/filesystem_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

// Arch-dependent implementation must define:
// * defIgnoredMountPoints
// * defIgnoredFsTypes
// * defIgnoredFSTypes
// * filesystemLabelNames
// * filesystemCollector.GetStats

Expand All @@ -35,17 +35,17 @@ var (
defIgnoredMountPoints,
"Regexp of mount points to ignore for filesystem collector.")

ignoredFsTypes = flag.String(
ignoredFSTypes = flag.String(
"collector.filesystem.ignored-fs-types",
defIgnoredFsTypes,
defIgnoredFSTypes,
"Regexp of filesystem types to ignore for filesystem collector.")

filesystemLabelNames = []string{"device", "mountpoint", "fstype"}
)

type filesystemCollector struct {
ignoredMountPointsPattern *regexp.Regexp
ignoredFsTypesPattern *regexp.Regexp
ignoredFSTypesPattern *regexp.Regexp
sizeDesc, freeDesc, availDesc,
filesDesc, filesFreeDesc, roDesc *prometheus.Desc
}
Expand All @@ -64,7 +64,7 @@ func init() {
func NewFilesystemCollector() (Collector, error) {
subsystem := "filesystem"
mountPointPattern := regexp.MustCompile(*ignoredMountPoints)
fsTypePatter := regexp.MustCompile(*ignoredFsTypes)
FSTypesPattern := regexp.MustCompile(*ignoredFSTypes)

sizeDesc := prometheus.NewDesc(
prometheus.BuildFQName(Namespace, subsystem, "size"),
Expand Down Expand Up @@ -104,7 +104,7 @@ func NewFilesystemCollector() (Collector, error) {

return &filesystemCollector{
ignoredMountPointsPattern: mountPointPattern,
ignoredFsTypesPattern: fsTypesPattern,
ignoredFSTypesPattern: FSTypesPattern,
sizeDesc: sizeDesc,
freeDesc: freeDesc,
availDesc: availDesc,
Expand Down
4 changes: 2 additions & 2 deletions collector/filesystem_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

const (
defIgnoredMountPoints = "^/(sys|proc|dev)($|/)"
defIgnoredFsTypes = "^(sys|proc)fs$"
defIgnoredFSTypes = "^(sys|proc)fs$"
ST_RDONLY = 0x1
)

Expand All @@ -48,7 +48,7 @@ func (c *filesystemCollector) GetStats() (stats []filesystemStats, err error) {
log.Debugf("Ignoring mount point: %s", mpd.mountPoint)
continue
}
if c.ignoredFsTypesPatter.MatchString(mpd.fsType) {
if c.ignoredFSTypesPattern.MatchString(mpd.fsType) {
log.Debugf("Ignoring fs type: %s", mpd.fsType)
continue
}
Expand Down

0 comments on commit bf88b6e

Please sign in to comment.