-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Benchmarks, fix tests and perfomance issues, and packing layers
Showing
47 changed files
with
661 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
*.swp | ||
*.gor | ||
*.rpm | ||
*.dep | ||
*.pkg | ||
|
||
*.out | ||
|
||
|
@@ -21,6 +24,7 @@ gor | |
|
||
.DS_Store | ||
|
||
goreplay | ||
corpus | ||
crashers | ||
suppressions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,19 +12,45 @@ LDFLAGS = -ldflags "-X main.VERSION=$(VERSION)$(PREFIX) -extldflags \"-static\" | |
MAC_LDFLAGS = -ldflags "-X main.VERSION=$(VERSION)$(PREFIX) -X main.DEMO=$(DEMO)" | ||
FADDR = ":8000" | ||
|
||
FPMCOMMON= \ | ||
--name goreplay \ | ||
--description "GoReplay is an open-source network monitoring tool which can record your live traffic, and use it for shadowing, load testing, monitoring and detailed analysis." \ | ||
-v $(VERSION) \ | ||
--vendor "Leonid Bugaev" \ | ||
-m "<[email protected]>" \ | ||
--url "https://goreplay.org" \ | ||
-s dir \ | ||
-C /tmp/gor-build \ | ||
|
||
release: release-x64 release-mac | ||
|
||
release-bin: | ||
docker run -v `pwd`:$(SOURCE_PATH) -t --env GOOS=linux --env GOARCH=amd64 -i gor go build -o gor -tags netgo $(LDFLAGS) | ||
|
||
release-x64: | ||
docker run -v `pwd`:$(SOURCE_PATH) -t --env GOOS=linux --env GOARCH=amd64 -i $(CONTAINER) go build -o gor -tags netgo $(LDFLAGS) && tar -czf gor_$(VERSION)$(PREFIX)_x64.tar.gz gor && rm gor | ||
docker run -v `pwd`:$(SOURCE_PATH) -t --env GOOS=linux --env GOARCH=amd64 -i $(CONTAINER) go build -o gor -tags netgo $(LDFLAGS) | ||
tar -czf gor_$(VERSION)$(PREFIX)_x64.tar.gz gor | ||
mkdir -p /tmp/gor-build | ||
mv ./gor /tmp/gor-build/gor | ||
cd /tmp/gor-build | ||
fpm $(FPMCOMMON) -a amd64 -t deb ./=/usr/local/bin | ||
fpm $(FPMCOMMON) -a amd64 -t rpm ./=/usr/local/bin | ||
rm -rf /tmp/gor-build | ||
|
||
release-x86: | ||
docker run -v `pwd`:$(SOURCE_PATH) -t --env GOOS=linux --env GOARCH=386 -i $(CONTAINER) go build -o gor -tags netgo $(LDFLAGS) && tar -czf gor_$(VERSION)$(PREFIX)_x86.tar.gz gor && rm gor | ||
docker run -v `pwd`:$(SOURCE_PATH) -t --env GOOS=linux --env GOARCH=386 -i $(CONTAINER) go build -o gor -tags netgo $(LDFLAGS) | ||
tar -czf gor_$(VERSION)$(PREFIX)_x86.tar.gz gor | ||
rm gor | ||
|
||
release-mac: | ||
go build -o gor $(MAC_LDFLAGS) && tar -czf gor_$(VERSION)$(PREFIX)_mac.tar.gz gor && rm gor | ||
go build -o gor $(MAC_LDFLAGS) | ||
tar -czf gor_$(VERSION)$(PREFIX)_mac.tar.gz gor | ||
mkdir -p /tmp/gor-build | ||
mv ./gor /tmp/gor-build/gor | ||
cd /tmp/gor-build | ||
fpm $(FPMCOMMON) -a amd64 -t osxpkg ./=/usr/local/bin | ||
rm -rf /tmp/gor-build | ||
|
||
|
||
install: | ||
go install $(MAC_LDFLAGS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ func TestElasticConnectionBuildFailWithoutScheme(t *testing.T) { | |
assertExpectedError(err, t) | ||
} | ||
|
||
// Argument scheme://host:port | ||
// Argument scheme://Host:port | ||
// i.e : http://localhost:9200 | ||
// Fail : explicit index is required | ||
func TestElasticConnectionBuildFailWithoutIndex(t *testing.T) { | ||
|
@@ -55,7 +55,7 @@ func TestElasticConnectionBuildFailWithoutIndex(t *testing.T) { | |
assertExpectedError(err, t) | ||
} | ||
|
||
// Argument scheme://host/index_name | ||
// Argument scheme://Host/index_name | ||
// i.e : http://localhost/gor | ||
func TestElasticConnectionBuildFailWithoutPort(t *testing.T) { | ||
uri := "http://localhost/" + expectedIndex | ||
|
@@ -67,7 +67,7 @@ func TestElasticConnectionBuildFailWithoutPort(t *testing.T) { | |
assertExpectedGorIndex(index, t) | ||
} | ||
|
||
// Argument scheme://host:port/index_name | ||
// Argument scheme://Host:port/index_name | ||
// i.e : http://localhost:9200/gor | ||
func TestElasticLocalConnectionBuild(t *testing.T) { | ||
uri := "http://localhost:9200/" + expectedIndex | ||
|
@@ -79,7 +79,7 @@ func TestElasticLocalConnectionBuild(t *testing.T) { | |
assertExpectedGorIndex(index, t) | ||
} | ||
|
||
// Argument scheme://host:port/index_name | ||
// Argument scheme://Host:port/index_name | ||
// i.e : http://localhost.local:9200/gor or https://localhost.local:9200/gor | ||
func TestElasticSimpleLocalWithSchemeConnectionBuild(t *testing.T) { | ||
uri := "http://localhost.local:9200/" + expectedIndex | ||
|
@@ -91,7 +91,7 @@ func TestElasticSimpleLocalWithSchemeConnectionBuild(t *testing.T) { | |
assertExpectedGorIndex(index, t) | ||
} | ||
|
||
// Argument scheme://host:port/index_name | ||
// Argument scheme://Host:port/index_name | ||
// i.e : http://localhost.local:9200/gor or https://localhost.local:9200/gor | ||
func TestElasticSimpleLocalWithHTTPSConnectionBuild(t *testing.T) { | ||
uri := "https://localhost.local:9200/" + expectedIndex | ||
|
@@ -103,7 +103,7 @@ func TestElasticSimpleLocalWithHTTPSConnectionBuild(t *testing.T) { | |
assertExpectedGorIndex(index, t) | ||
} | ||
|
||
// Argument scheme://host:port/index_name | ||
// Argument scheme://Host:port/index_name | ||
// i.e : localhost.local:9200/pathtoElastic/gor | ||
func TestElasticLongPathConnectionBuild(t *testing.T) { | ||
uri := "http://localhost.local:9200/pathtoElastic/" + expectedIndex | ||
|
@@ -115,7 +115,7 @@ func TestElasticLongPathConnectionBuild(t *testing.T) { | |
assertExpectedGorIndex(index, t) | ||
} | ||
|
||
// Argument scheme://host:userinfo@port/index_name | ||
// Argument scheme://Host:userinfo@port/index_name | ||
// i.e : http://user:[email protected]:9200/gor | ||
func TestElasticBasicAuthConnectionBuild(t *testing.T) { | ||
uri := "http://user:[email protected]:9200/" + expectedIndex | ||
|
@@ -127,7 +127,7 @@ func TestElasticBasicAuthConnectionBuild(t *testing.T) { | |
assertExpectedGorIndex(index, t) | ||
} | ||
|
||
// Argument scheme://host:port/path/index_name | ||
// Argument scheme://Host:port/path/index_name | ||
// i.e : http://localhost.local:9200/path/gor or https://localhost.local:9200/path/gor | ||
func TestElasticComplexPathConnectionBuild(t *testing.T) { | ||
uri := "http://localhost.local:9200/path/" + expectedIndex | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.