Skip to content

Commit

Permalink
did the measurements for Go
Browse files Browse the repository at this point in the history
  • Loading branch information
tnfink committed Feb 1, 2017
1 parent e756dde commit db0cae3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions mlc-go-project/mlc-go-microservice/adderMicroservice/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"io"
"net/http"
"strconv"
"fmt"
)

func handler(w http.ResponseWriter, r *http.Request) {
Expand All @@ -30,5 +31,6 @@ func handler(w http.ResponseWriter, r *http.Request) {

func main() {
http.HandleFunc("/adder", handler)
fmt.Print("Starting up")
http.ListenAndServe(":8080", nil)
}
Binary file modified src/main/comparison/Results.numbers
Binary file not shown.
11 changes: 9 additions & 2 deletions src/main/comparison/measureLightness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ function echoSizeOfFile {
}

function countAllLOCs {
find $1 \( -name "*.java" -or -name "*.xml" -or -name "*.xml" -or -name "*.yaml" \) -exec cat "{}" \; | wc -l
find $1 \( -name "*.java" -or -name "*.xml" -or -name "*.xml" -or -name "*.yaml" -or -name "*.go" \) -exec cat "{}" \; | wc -l
}

pushd ../../../
#pushd ../../../

# log "Build project"

Expand All @@ -25,6 +25,7 @@ SPRINGBOOT_MS_DIR=mlc-springboot-project/mlc-springboot-microservice
WILDFLY_SWARM_MS_DIR=mlc-wildflyswarm-project/mlc-wildflyswarm-microservice
WILDFLY_MS_DIR=mlc-wildfly-project/mlc-wildfly-microservice
SNAP_MS_DIR=mlc-snap-project/mlc-snap-microservice
GO_MS_DIR=mlc-go-project/mlc-go-microservice

log "Measure sizes of Executables"

Expand All @@ -40,6 +41,9 @@ echoSizeOfFile ${WILDFLY_SWARM_MS_DIR}/target/mlc-wildflyswarm-microservice-1.0-
echo Snap
echoSizeOfFile ${SNAP_MS_DIR}/.stack-work/docker/_home/.local/bin/*

echo Go
echoSizeOfFile ${GO_MS_DIR}/../target/*

log "Measure LOCs"

echo Spring-Boot
Expand All @@ -54,6 +58,9 @@ countAllLOCs ${WILDFLY_SWARM_MS_DIR}
echo Snap
countAllLOCs ${SNAP_MS_DIR}

echo Go
countAllLOCs ${GO_MS_DIR}


log Done

Expand Down

0 comments on commit db0cae3

Please sign in to comment.