-
Notifications
You must be signed in to change notification settings - Fork 0
/
latencies.R
88 lines (66 loc) · 4.54 KB
/
latencies.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
library(ggplot2)
library(tidyr)
library(dplyr)
library(ggcorrplot)
# Spalte 1: Anfragenummer
# Spalte 2: Zeit der Anfrage [ns], nullbasiert
# Spalte 3: Verarbeitungszeit [ns]
# arm_clock datasets
axfinder <- read.table("db_responses/arm_clock/default/axfinder/latencies.txt", header = FALSE)
countone <- read.table("db_responses/arm_clock/default/countone/latencies.txt", header = FALSE)
pricespread <- read.table("db_responses/arm_clock/default/pricespread/latencies.txt", header = FALSE)
colnames(axfinder) <- c("ID", "Timestamp", "ProcessingTime")
colnames(countone) <- c("ID", "Timestamp", "ProcessingTime")
colnames(pricespread) <- c("ID", "Timestamp", "ProcessingTime")
dat <- axfinder %>% na.omit() %>% sample_frac(0.1)
dat2 <- countone %>% na.omit() %>% sample_frac(0.1)
dat3 <- pricespread %>% na.omit() %>% sample_frac(0.01)
# Idee: füge alle Datensätze mit sampling zu einem Zusammen
# erstelle einen Facet Grid mit Facette pro Datensatz
# farbe für die drei messtabellen axfinder etc
# facet für die scenarien
dat$Dataset <- "Dataset 1"
dat2$Dataset <- "Dataset 2"
dat3$Dataset <- "Dataset 3"
combined_data <- rbind(dat, dat2, dat3)
ggplot(combined_data, aes(x=Timestamp, y=ProcessingTime, colour=Dataset)) + geom_point()
ggplot(data = combined_data, aes(x = Timestamp, y = ProcessingTime)) +
geom_point() +
geom_line() +
facet_wrap(~Dataset) +
scale_x_continuous(labels = scales::comma) + # Formatierung der x-Achsenbeschriftung
scale_y_continuous(labels = scales::comma) # Formatierung der y-Achsenbeschriftung
# Erstellen des Plots
ggplot(countone, aes(x = ID)) +
geom_line(aes(y = Timestamp, color = "Spalte2")) +
geom_line(aes(y = ProcessingTime, color = "Spalte3")) +
scale_color_manual(values = c("Timestamp" = "blue", "ProcessingTime" = "red")) +
scale_x_continuous(labels = scales::comma) + # Formatierung der x-Achsenbeschriftung
scale_y_continuous(labels = scales::comma) + # Formatierung der y-Achsenbeschriftung
labs(title = "Visualisierung des Datensatzes",
x = "Index",
y = "Werte")
#x86_clock
## 1: default calibrate
axfinder_1 <- read.table("db_responses/x86_clock/res_duration-20_stress-0_scenario-default_calibrate/axfinder/latencies.txt", header = FALSE)
pricespread_1 <- read.table("db_responses/x86_clock/res_duration-20_stress-0_scenario-default_calibrate/pricespread/latencies.txt", header = FALSE)
## 2. default measure
axfinder_2 <- read.table("db_responses/x86_clock/res_duration-20_stress-0_scenario-default_measure/axfinder/latencies.txt", header = FALSE)
countone_2 <- read.table("db_responses/x86_clock/res_duration-20_stress-0_scenario-default_measure/axfinder/latencies.txt", header = FALSE)
pricespread_2 <- read.table("db_responses/x86_clock/res_duration-20_stress-0_scenario-default_measure/pricespread/latencies.txt", header = FALSE)
## 3. default measure
axfinder_3 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-default_measure/axfinder/latencies.txt", header = FALSE)
countone_3 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-default_measure/axfinder/latencies.txt", header = FALSE)
pricespread_3 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-default_measure/pricespread/latencies.txt", header = FALSE)
## 4. fifo measure
axfinder_4 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-fifo_measure/axfinder/latencies.txt", header = FALSE)
countone_4 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-fifo_measure/axfinder/latencies.txt", header = FALSE)
pricespread_4 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-fifo_measure/pricespread/latencies.txt", header = FALSE)
## 5. shield measure
axfinder_5 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-shield_measure/axfinder/latencies.txt", header = FALSE)
countone_5 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-shield_measure/axfinder/latencies.txt", header = FALSE)
pricespread_5 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-shield_measure/pricespread/latencies.txt", header = FALSE)
## 6. shield + fifo measure
axfinder_6 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-shield+fifo_measure/axfinder/latencies.txt", header = FALSE)
countone_6 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-shield+fifo_measure/axfinder/latencies.txt", header = FALSE)
pricespread_6 <- read.table("db_responses/x86_clock/res_duration-20_stress-1_scenario-shield+fifo_measure/pricespread/latencies.txt", header = FALSE)