Skip to content

Commit 923d5a3

Browse files
committed
update
1 parent b800d24 commit 923d5a3

File tree

2 files changed

+48
-29
lines changed

2 files changed

+48
-29
lines changed

statistics/analyze.R

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

2-
#EMB,NAME,TYPE,LANGUAGE,RUNTIME,BUILD,FILES,LOCS,DATABASE,LICENSE,ENDPOINTS,URL
3-
DATA_FILE="./data.csv"
2+
#EMB,NAME,TYPE,LANGUAGE,RUNTIME,BUILD,FILES,LOCS,DATABASE,LICENSE,ENDPOINTS,AUTHENTICATION,URL
3+
DATA_FILE <- "./data.csv"
44

5-
UNDEFINED = "UNDEFINED"
5+
UNDEFINED <- "UNDEFINED"
66

77
handleMultiValues <- function(s){
88
return(gsub(";", ", ", s))
@@ -12,9 +12,9 @@ handleMultiValues <- function(s){
1212
areInTheSubset <- function(x,y){
1313

1414
### first consider vector with all FALSE
15-
result = x!=x
15+
result <- x!=x
1616
for(k in y){
17-
result = result | x==k
17+
result <- result | x==k
1818
}
1919
return(result)
2020
}
@@ -64,32 +64,37 @@ markdown <- function (){
6464
}
6565

6666

67-
latex <- function(TABLE,SUTS){
67+
latex <- function(TABLE,SUTS,auth){
6868

6969
# TODO what columns to include further could be passed as boolean selection.
7070
# will implement when needed
7171

7272
dt <- read.csv(DATA_FILE,header=T)
73-
dt = dt[areInTheSubset(dt$NAME,SUTS),]
74-
dt = dt[order(dt$NAME),]
73+
dt <- dt[areInTheSubset(dt$NAME,SUTS),]
74+
dt <- dt[order(dt$NAME),]
7575

7676
unlink(TABLE)
7777
sink(TABLE, append = TRUE, split = TRUE)
7878

79-
cat("\\begin{tabular}{l rrr}\\\\ \n")
79+
cat("\\begin{tabular}{l rrrr}\\\\ \n")
8080
cat("\\toprule \n")
81-
cat("SUT & \\#SourceFiles & \\#LOCs & \\#Endpoints \\\\ \n")
81+
cat("SUT & \\#SourceFiles & \\#LOCs & \\#Endpoints & Auth\\\\ \n")
8282
cat("\\midrule \n")
8383

8484
for (i in 1:nrow(dt)){
8585

86-
row = dt[i,]
86+
row <- dt[i,]
8787
cat("\\emph{",row$NAME,"}",sep="")
8888

8989
cat(" & ", row$FILES)
9090
cat(" & ", row$LOCS)
9191
cat(" & ", row$ENDPOINTS)
9292

93+
cat(" & ")
94+
if(row$AUTHENTICATION){
95+
cat("\\checkmark")
96+
}
97+
9398
cat(" \\\\ \n")
9499
}
95100

@@ -101,6 +106,9 @@ latex <- function(TABLE,SUTS){
101106
cat(sum(dt$LOCS))
102107
cat(" & ")
103108
cat(sum(dt$ENDPOINTS))
109+
cat(" & ")
110+
cat(sum(dt$AUTHENTICATION))
111+
104112
cat(" \\\\ \n")
105113

106114
cat("\\bottomrule \n")

statistics/suts.R

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,47 @@ source("analyze.R")
33
suts <- function(){
44

55
# This generated table should NOT be added to Git, as will change based on papers
6-
TABLE = "./table_suts.tex"
6+
TABLE <- "./table_suts.tex"
77

88
#Names here should match what in data.csv
9-
SUTS = c(
9+
SUTS <- c(
1010
### REST
11-
# "bibliothek",
11+
"bibliothek",
1212
"blogapi",
13-
# "catwatch",
14-
# "cwa-verification",
13+
"catwatch",
14+
"cwa-verification",
15+
"erc20-rest-service",
1516
"familie-ba-sak",
16-
# "features-service",
17-
# "genome-nexus",
18-
# "gestaohospital",
19-
# "languagetool",
17+
"features-service",
18+
"genome-nexus",
19+
"gestaohospital",
20+
"http-patch-spring",
21+
"languagetool",
2022
"market",
23+
"microcks",
2124
"ocvn",
25+
"ohsome-api",
2226
"pay-publicapi",
23-
# "person-controller",
27+
"person-controller",
2428
"proxyprint",
29+
"quartz-manager",
2530
"reservations-api",
26-
# "rest-ncs",
27-
# "rest-news",
28-
# "rest-scs",
29-
# "restcountries",
31+
"rest-ncs",
32+
"rest-news",
33+
"rest-scs",
34+
"restcountries",
3035
"scout-api",
31-
# "session-service",
32-
"tiltaksgjennomforing-api",
36+
"session-service",
37+
"spring-actuator-demo",
38+
"spring-batch-rest",
39+
"spring-ecommerce",
40+
"spring-rest-example",
41+
"swagger-petstore",
42+
"tiltaksgjennomforing",
3343
"tracking-system",
34-
# "user-management",
35-
# "youtube-mock",
44+
"user-management",
45+
"webgoat",
46+
"youtube-mock",
3647
### GraphQL
3748
# "petclinic-graphql",
3849
# "patio-api",

0 commit comments

Comments
 (0)