-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from jlouis/jlouis-initial-R
Introduce R as a tool for graphing.
- Loading branch information
Showing
4 changed files
with
63 additions
and
11 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,15 +1,16 @@ | ||
#*# | ||
*.beam | ||
*.class | ||
*.hi | ||
*.o | ||
*.plt | ||
*~ | ||
.* | ||
competition/log/*.log | ||
competition/wsdemo-snap | ||
data/ | ||
dist/ | ||
results/ | ||
deps/ | ||
dist/ | ||
ebin/ | ||
competition/log/*.log | ||
competition/wsdemo-snap | ||
*.o | ||
*.beam | ||
*.plt | ||
*.hi | ||
*~ | ||
#*# | ||
*.class | ||
results/ | ||
stats/stat_results/ |
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,10 @@ | ||
.PHONY: build report stats | ||
|
||
build: | ||
./rebar get-deps compile | ||
|
||
report: | ||
./bin/compile_all_stats.sh | ||
|
||
stats: | ||
$(MAKE) -C stats stats |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.PHONY = all stats dirs | ||
|
||
all: stats | ||
|
||
stats: dirs counts.csv | ||
R CMD BATCH stats.r | ||
|
||
dirs: | ||
mkdir -p stat_results | ||
|
||
clean: | ||
rm -f counts.csv | ||
rm -f *.Rout | ||
rm -f stat_results/*.pdf | ||
|
||
counts.csv: | ||
echo "type, clients, handshakes, connection_timeouts, messages_sent, messages_recv, crashes" > counts.csv | ||
for k in ../data/*/counts.csv; do tail -n 1 "$$k" >> counts.csv ; done | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# R-script for producing statistics output: | ||
# Before runnning this script, makes sure you have the right packages installed: | ||
# install.packages("ggplot2") | ||
|
||
# Make sure needed libraries are there | ||
require(ggplot2) | ||
|
||
# Set some global variables | ||
base_size <- 9 | ||
|
||
# Read in data | ||
counts <- read.csv("counts.csv", header=TRUE) | ||
|
||
# First plot, connection timeouts | ||
pdf("stat_results/conn_timeouts.pdf") | ||
conn_timeouts <- ggplot(counts, aes(x = type, y = connection_timeouts)) | ||
(conn_timeouts | ||
+ geom_bar() | ||
+ xlab('Framework') | ||
+ ylab('Connections Lost') | ||
+ opts(axis.ticks = theme_blank(), | ||
axis.text.x = theme_text(size = base_size * 0.8, | ||
angle = 330, | ||
hjust = 0, | ||
colour = "grey50"))) | ||
dev.off() | ||
|