Skip to content

Commit

Permalink
Merge pull request #42 from CapillarySoftware/format
Browse files Browse the repository at this point in the history
cleanup formatting
  • Loading branch information
vrecan committed Jul 18, 2014
2 parents 2f3f1e6 + ffa449d commit 1a342d8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ deploy:
provider: releases
api_key:
secure: cAfvm2u93f2+NVWn0KOVgjQKl/ZiRO579l+2hm0BN3A+0ptgNuY2wxonhpfy5S5j9cVohm6XyaEdD+TYPQJXm1XVCb7PvPCHdgk833pgBZd79lKy+N/Uz2fd9V3Al3Y/57+eP4V263Z+8/YYDttrqB1NOQ7cX2xAV4Ql3tf2hY4=
file: bin/goiostat
file: $HOME/gopath/bin/goiostat
skip_cleanup: true
on:
repo: CapillarySoftware/goiostat
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Currently only support linux 2.6 kernel.

<h2>install directions</h2>
<pre>
export GOPATH=$HOME/code/go
export GOBIN=$HOME/bin
export PATH=$PATH:$GOBIN
<code>
* go get github.com/tools/godep
* go get code.google.com/p/go.tools/cmd/cover
Expand Down
2 changes: 1 addition & 1 deletion ioStatTransform/ioStatTransform.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func TransformStat(channel <-chan *diskStat.DiskStat, statsOutputChannel chan *d

if in {
//ignore partitions with no history of activity
if (stat.ReadsCompleted == 0 && stat.WritesCompleted == 0) || IsPartition(&stat.Device){
if (stat.ReadsCompleted == 0 && stat.WritesCompleted == 0) || IsPartition(&stat.Device) {
continue
}
diffStat, err := getDiffDiskStat(&prevStat, stat)
Expand Down
4 changes: 2 additions & 2 deletions ioStatTransform/ioStatTransform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ var _ = Describe("IoStatTransform", func() {
It("validate partition regeg against device", func() {
device := "sda"
Expect(IsPartition(&device)).Should(BeFalse())
})
})

It("validate partition regeg against partition", func() {
device := "sda1"
Expect(IsPartition(&device)).Should(BeTrue())
})
})
})

Describe("IntegrationTest", func() {
Expand Down
12 changes: 6 additions & 6 deletions logOutput/logOutput_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package logOutput_test

import (
"fmt"
. "github.com/CapillarySoftware/goiostat/diskStat"
. "github.com/CapillarySoftware/goiostat/logOutput"
. "github.com/CapillarySoftware/goiostat/outputInterface"
. "github.com/CapillarySoftware/goiostat/protocols"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"fmt"
)

func testInterface(output Output, stats *ExtendedIoStats) {
Expand Down Expand Up @@ -55,10 +55,10 @@ var _ = Describe("Test LogOutput Interface", func() {
float64(0),
float64(0),
float64(0),
}
}
output := &LogOutput{PProtoBuffers}
err := output.SendStats(&stats)

Expect(err).ShouldNot(BeNil())
})

Expand All @@ -78,11 +78,11 @@ var _ = Describe("Test LogOutput Interface", func() {
float64(0),
float64(0),
float64(0),
}
}
output := &LogOutput{PJson}
err := output.SendStats(&stats)
fmt.Println(err)

Expect(err).Should(BeNil())
})
})
})

0 comments on commit 1a342d8

Please sign in to comment.