Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
pulse2snap
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzej-k committed Nov 26, 2015
1 parent 34cdb16 commit dc474b1
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ before_install:
- cp .netrc ~
- chmod 600 .netrc
- go get github.com/tools/godep
- if [ ! -d $PULSE_PLUGIN_SOURCE ]; then mkdir -p $HOME/gopath/src/github.com/intelsdi-x; ln -s $TRAVIS_BUILD_DIR $PULSE_PLUGIN_SOURCE; fi # CI for forks not from intelsdi-x
- if [ ! -d $SNAP_PLUGIN_SOURCE ]; then mkdir -p $HOME/gopath/src/github.com/intelsdi-x; ln -s $TRAVIS_BUILD_DIR $SNAP_PLUGIN_SOURCE; fi # CI for forks not from intelsdi-x
env:
global:
- PULSE_PLUGIN_SOURCE=/home/travis/gopath/src/github.com/intelsdi-x/pulse-plugin-processor-movingaverage
- SNAP_PLUGIN_SOURCE=/home/travis/gopath/src/github.com/intelsdi-x/snap-plugin-processor-movingaverage
matrix:
- TEST=unit
install:
- export TMPDIR=$HOME/tmp
- mkdir -p $TMPDIR
- cd $PULSE_PLUGIN_SOURCE # change dir into source
- cd $SNAP_PLUGIN_SOURCE # change dir into source
- make deps
script:
- make check TEST=$TEST 2>&1 # Run test suite
Expand Down
8 changes: 4 additions & 4 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# pulse-plugin-processor-movingaverage
Pulse plugin intended to process data and return a moving average of the data
# snap-plugin-processor-movingaverage
Snap plugin intended to process data and return a moving average of the data
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ package main
import (
"os"

"github.com/intelsdi-x/pulse-plugin-processor-movingaverage/movingaverage"
"github.com/intelsdi-x/pulse/control/plugin"
"github.com/intelsdi-x/snap-plugin-processor-movingaverage/movingaverage"
"github.com/intelsdi-x/snap/control/plugin"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions movingaverage/movingaverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (

log "github.com/Sirupsen/logrus"

"github.com/intelsdi-x/pulse/control/plugin"
"github.com/intelsdi-x/pulse/control/plugin/cpolicy"
"github.com/intelsdi-x/pulse/core/ctypes"
"github.com/intelsdi-x/snap/control/plugin"
"github.com/intelsdi-x/snap/control/plugin/cpolicy"
"github.com/intelsdi-x/snap/core/ctypes"
)

const (
Expand All @@ -38,7 +38,7 @@ const (

// Meta returns a plugin meta data
func Meta() *plugin.PluginMeta {
return plugin.NewPluginMeta(name, version, pluginType, []string{plugin.PulseGOBContentType}, []string{plugin.PulseGOBContentType})
return plugin.NewPluginMeta(name, version, pluginType, []string{plugin.SnapGOBContentType}, []string{plugin.SnapGOBContentType})
}

func NewMovingaverageProcessor() *movingAverageProcessor {
Expand Down
18 changes: 9 additions & 9 deletions movingaverage/movingaverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"testing"
"time"

"github.com/intelsdi-x/pulse/control/plugin"
"github.com/intelsdi-x/pulse/control/plugin/cpolicy"
"github.com/intelsdi-x/pulse/core/ctypes"
"github.com/intelsdi-x/snap/control/plugin"
"github.com/intelsdi-x/snap/control/plugin/cpolicy"
"github.com/intelsdi-x/snap/core/ctypes"
. "github.com/smartystreets/goconvey/convey"
)

Expand Down Expand Up @@ -98,7 +98,7 @@ func TestMovingAverageProcessorMetrics(t *testing.T) {
enc.Encode(metrics)
movingAverageObj := NewMovingaverageProcessor()

_, received_data, _ := movingAverageObj.Process("pulse.gob", buf.Bytes(), config)
_, received_data, _ := movingAverageObj.Process("snap.gob", buf.Bytes(), config)

var metrics_new []plugin.PluginMetricType

Expand All @@ -123,7 +123,7 @@ func TestMovingAverageProcessorMetrics(t *testing.T) {

movingAverageObj := NewMovingaverageProcessor()

_, received_data, _ := movingAverageObj.Process("pulse.gob", buf.Bytes(), config)
_, received_data, _ := movingAverageObj.Process("snap.gob", buf.Bytes(), config)

var metrics_new []plugin.PluginMetricType

Expand All @@ -146,7 +146,7 @@ func TestMovingAverageProcessorMetrics(t *testing.T) {

movingAverageObj := NewMovingaverageProcessor()

_, received_data, _ := movingAverageObj.Process("pulse.gob", buf.Bytes(), nil)
_, received_data, _ := movingAverageObj.Process("snap.gob", buf.Bytes(), nil)

var metrics_new []plugin.PluginMetricType

Expand All @@ -169,7 +169,7 @@ func TestMovingAverageProcessorMetrics(t *testing.T) {
enc.Encode(metrics)
movingAverageObj := NewMovingaverageProcessor()

_, received_data, _ := movingAverageObj.Process("pulse.gob", buf.Bytes(), nil)
_, received_data, _ := movingAverageObj.Process("snap.gob", buf.Bytes(), nil)

var metrics_new []plugin.PluginMetricType

Expand All @@ -192,7 +192,7 @@ func TestMovingAverageProcessorMetrics(t *testing.T) {
enc.Encode(metrics)
movingAverageObj := NewMovingaverageProcessor()

_, received_data, _ := movingAverageObj.Process("pulse.gob", buf.Bytes(), nil)
_, received_data, _ := movingAverageObj.Process("snap.gob", buf.Bytes(), nil)

var metrics_new []plugin.PluginMetricType

Expand All @@ -215,7 +215,7 @@ func TestMovingAverageProcessorMetrics(t *testing.T) {

movingAverageObj := NewMovingaverageProcessor()

_, received_data, _ := movingAverageObj.Process("pulse.gob", buf.Bytes(), nil)
_, received_data, _ := movingAverageObj.Process("snap.gob", buf.Bytes(), nil)

var metrics_new []plugin.PluginMetricType

Expand Down
6 changes: 3 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
GITVERSION=`git describe --always`
SOURCEDIR=$1
BUILDDIR=$SOURCEDIR/build
PLUGIN=`echo $SOURCEDIR | grep -oh "pulse-.*"`
PLUGIN=`echo $SOURCEDIR | grep -oh "snap-.*"`
ROOTFS=$BUILDDIR/rootfs
BUILDCMD='go build -a -ldflags "-w"'

echo
echo "**** Pulse Plugin Build ****"
echo "**** Snap Plugin Build ****"
echo

# Disable CGO for builds
Expand All @@ -22,6 +22,6 @@ mkdir -p $ROOTFS

# Build plugin
echo "Source Dir = $SOURCEDIR"
echo "Building Pulse Plugin: $PLUGIN"
echo "Building Snap Plugin: $PLUGIN"
$BUILDCMD -o $ROOTFS/$PLUGIN

0 comments on commit dc474b1

Please sign in to comment.