Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P2 #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

P2 #5

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions accountservice/Dockerfile

This file was deleted.

107 changes: 0 additions & 107 deletions accountservice/dbclient/boltclient.go

This file was deleted.

24 changes: 0 additions & 24 deletions accountservice/dbclient/mockclient.go

This file was deleted.

7 changes: 0 additions & 7 deletions accountservice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ package main
import (
"fmt"
"github.com/callistaenterprise/goblog/accountservice/service"
"github.com/callistaenterprise/goblog/accountservice/dbclient"
)

var appName = "accountservice"

func main() {
fmt.Printf("Starting %v\n", appName)
initializeBoltClient()
service.StartWebServer("6767")
}

func initializeBoltClient() {
service.DBClient = &dbclient.BoltClient{}
service.DBClient.OpenBoltDb()
service.DBClient.Seed()
}
10 changes: 0 additions & 10 deletions accountservice/model/account.go

This file was deleted.

35 changes: 0 additions & 35 deletions accountservice/service/handlers.go

This file was deleted.

69 changes: 0 additions & 69 deletions accountservice/service/handlers_test.go

This file was deleted.

5 changes: 4 additions & 1 deletion accountservice/service/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ var routes = Routes{
"GetAccount", // Name
"GET", // HTTP method
"/accounts/{accountId}", // Route pattern
GetAccount,
func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.Write([]byte("{\"result\":\"OK\"}"))
},
},
}
2 changes: 0 additions & 2 deletions copyall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ export CGO_ENABLED=0
cd accountservice;go get;go build -o accountservice-linux-amd64;echo built `pwd`;cd ..

export GOOS=darwin

docker build -t someprefix/accountservice accountservice/
5 changes: 5 additions & 0 deletions loadtest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Load test for the Go blog series

### Usage

mvn gatling:execute -Dusers=1000 -Dduration=30 -DbaseUrl=http://192.168.99.100:6767
65 changes: 65 additions & 0 deletions loadtest/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>se.callistaenterprise.goblog</groupId>
<artifactId>loadtest</artifactId>
<version>1.0-SNAPSHOT</version>

<repositories>
<repository>
<id>excilys</id>
<name>Excilys Repository</name>
<url>http://repository.excilys.com/content/groups/public</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>excilys</id>
<name>Excilys Repository</name>
<url>http://repository.excilys.com/content/groups/public</url>
</pluginRepository>
</pluginRepositories>

<properties>
<gatling.version>2.1.7</gatling.version>
<gatling-plugin.version>2.1.7</gatling-plugin.version>
</properties>

<dependencies>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-plugin.version}</version>
<configuration>
<goalPrefix>gatling</goalPrefix>
<simulationClass>${simulationClass}</simulationClass>
<jvmArgs>
<jvmArg>-Dusers=1</jvmArg>
<jvmArg>-DbaseUrl=http://localhost:6767</jvmArg>
<jvmArg>-Dduration=30</jvmArg>
</jvmArgs>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
9 changes: 9 additions & 0 deletions loadtest/src/test/resources/application.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
####################################
# Akka Actor Config File #
####################################

akka {
scheduler {
tick-duration = 50ms
}
}
Loading