Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
fix #176
Browse files Browse the repository at this point in the history
  • Loading branch information
taivop committed Dec 6, 2016
1 parent 7b6e868 commit 0d52439
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/r/ms3_common.r
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ get_service_and_queue_distributions <- function(requests2) {
print(paste0("At row ", i, " out of ", nrow(requests2)))
}
row <- requests2[i,]
total_expanded <- seq(row$timeEnqueued, row$timeReturned, 1)
queue_expanded <- seq(row$timeEnqueued, row$timeDequeued, 1)
total_expanded <- seq(row$timeCreated, row$timeReturned, 1)
queue_expanded <- seq(row$timeCreated, row$timeDequeued, 1)
service_expanded <- seq(row$timeDequeued, row$timeReturned, 1)
total_timestamps <- append(total_timestamps, total_expanded)
queue_timestamps <- append(queue_timestamps, queue_expanded)
Expand Down
6 changes: 3 additions & 3 deletions scripts/r/part1_mm1.r
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ actual = list()
time_zero <- min(requests$timeCreated)
N_SAMPLES <- 5000
requests2 <- requests %>%
select(timeEnqueued, timeDequeued, timeReturned) %>%
mutate(timeEnqueued=timeEnqueued-time_zero,
select(timeCreated, timeDequeued, timeReturned) %>%
mutate(timeCreated=timeCreated-time_zero,
timeDequeued=timeDequeued-time_zero,
timeReturned=timeReturned-time_zero) %>%
top_n(N_SAMPLES, wt=desc(timeEnqueued))
top_n(N_SAMPLES, wt=desc(timeCreated))

distributions <- get_service_and_queue_distributions(requests2)
means <- distributions %>%
Expand Down

0 comments on commit 0d52439

Please sign in to comment.