-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.R
32 lines (28 loc) · 1.21 KB
/
server.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# This is the server logic for a Shiny web application.
library(shiny)
library(ggplot2)
shinyServer(function(input, output, session) {
output$compilationPackageTimes <- renderPlot({
package <- input$ipackage
pc <- processed_data$compilation[[package]]$total
function_names <<- names(processed_data$compilation[[package]]$functions)
updateSelectInput(session, "ifunction", choices = function_names)
barplot(sapply(pc, function(x) as.numeric(x[[2]], units="secs")),
ylab="time (seconds)",
xlab="date (commit)",
main=paste(package, "package compilation time"))
})
output$compilationFunctionTimes <- renderPlot({
fname <- input$ifunction
pname <- input$ipackage
fc <- processed_data$compilation[[pname]][['functions']][[fname]]
barplot(sapply(fc, function(x) as.numeric(x[[2]], units="secs") * 1000),
ylab="time (microseconds)",
xlab="date (commit)",
main=paste(fname, "compilation times"))
})
output$executionSummary <- renderPlot({
date <- input$iexecution_date
graphlog(processed_data$execution[[date]], name=date)
})
})