Skip to content

adding the trace syncronization data #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
replay - log start time: 31-12-2023_20-54-33
record - log start time: 31-12-2023_20-34-21

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
replay log start time: 27-12-2023_21-29-29

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

236,288 changes: 236,288 additions & 0 deletions traces/20231231-trace-beatsaber-mqp-beatsaber-replay-accuracy-validation-2/trace.txt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
---
title: "Experiment"
output:
github_document:
toc: yes
toc_depth: 1
dev: svg
---

# Description

# Results

```{r setup, message = FALSE}

library(tidyverse)
theme_set(theme_bw())
library(knitr)
library(forcats)
library(data.table)
library(cowplot)
library(gghighlight)
library(zoo)
library(RColorBrewer)

saveplot <- function(filename, ...) {
ggsave2(filename, ...)
knitr::plot_crop(filename)
}
```

## Frame Rate

```{r frame_rate}
fps <- system('grep -Po "(?<=FPS=)[0-9]+" logcat_VrApi.log', intern = TRUE)
data <- tibble(fps) %>% mutate(fps = as.numeric(fps)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=fps)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```
## Power Draw

### CPU Frequency

```{r battery_headset}
if (file.exists("logcat_VrApi.log")) {
cpu_freq <- system('grep -Po "(?<=CPU4/GPU=)[0-9]/[0-9],[0-9]+/[0-9]+(?=MHz,OC)" logcat_VrApi.log | cut -d, -f 2 | cut -d/ -f 1', intern = TRUE)
data <- tibble(cpu_freq) %>% mutate(cpu_freq = as.numeric(cpu_freq)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=cpu_freq)) +
geom_line() +
ylim(0, NA) +
labs(y = "MHz", x = "time [s]") +
theme_half_open() + background_grid()
}
```
### GPU Frequency

```{r battery_headset}
if (file.exists("logcat_VrApi.log")) {
gpu_freq <- system('grep -Po "(?<=CPU4/GPU=)[0-9]/[0-9],[0-9]+/[0-9]+(?=MHz,OC)" logcat_VrApi.log | cut -d, -f 2 | cut -d/ -f 2', intern = TRUE)
data <- tibble(gpu_freq) %>% mutate(gpu_freq = as.numeric(gpu_freq)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=gpu_freq)) +
geom_line() +
ylim(0, NA) +
labs(y = "MHz", x = "time [s]") +
theme_half_open() + background_grid()
}
```
### CPU Level

```{r battery_headset}
if (file.exists("logcat_VrApi.log")) {
cpu_freq <- system('grep -Po "(?<=CPU4/GPU=)[0-9]/[0-9],[0-9]+/[0-9]+(?=MHz,OC)" logcat_VrApi.log | cut -d, -f 1 | cut -d/ -f 1', intern = TRUE)
data <- tibble(cpu_freq) %>% mutate(cpu_freq = as.numeric(cpu_freq)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=cpu_freq)) +
geom_line() +
ylim(0, NA) +
labs(y = "Level", x = "time [s]") +
theme_half_open() + background_grid()
}
```

### GPU Level

```{r battery_headset}
if (file.exists("logcat_VrApi.log")) {
gpu_freq <- system('grep -Po "(?<=CPU4/GPU=)[0-9]/[0-9],[0-9]+/[0-9]+(?=MHz,OC)" logcat_VrApi.log | cut -d, -f 1 | cut -d/ -f 2', intern = TRUE)
data <- tibble(gpu_freq) %>% mutate(gpu_freq = as.numeric(gpu_freq)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=gpu_freq)) +
geom_line() +
ylim(0, NA) +
labs(y = "Level", x = "time [s]") +
theme_half_open() + background_grid()
}
```

## Battery Levels

### Headset

```{r battery_headset}
if (file.exists("battery.log")) {
battery <- system('grep -Po "(?<=level: )[0-9]+" battery.log', intern = TRUE)
data <- tibble(battery) %>% mutate(battery = as.numeric(battery)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=battery)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
}
```

### Controllers

```{r battery_controllers}
if (file.exists("OVRRemoteService.log")) {
battery <- system("grep -Po '(?<=Type:)\\s+(Left|Right),.+Battery:\\s+[0-9]+(?=%)' OVRRemoteService.log | tr -s ' ' | sed -e \'s/^[[:space:]]*//\' -e \'s/\\n[[:space:]]*//\' | cut -d' ' -f 1,7", intern=TRUE)
data <- tibble(battery) %>% separate(battery, c("hand", "level"), convert = TRUE) %>% group_by(hand) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x=ts, y=level, color=hand)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
}
```

## CPU Usage

```{r cpu_usage}
cpu_util <- system('grep -Po "(?<=CPU%=)[0-9]+.[0-9]+" logcat_VrApi.log', intern = TRUE)
data <- tibble(cpu_util) %>% mutate(cpu_util = 100 * as.numeric(cpu_util)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=cpu_util)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```

## GPU Usage

```{r gpu_usage}
gpu_util <- system('grep -Po "(?<=GPU%=)[0-9]+.[0-9]+" logcat_VrApi.log', intern = TRUE)
data <- tibble(gpu_util) %>% mutate(gpu_util = 100 * as.numeric(gpu_util)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=gpu_util)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```

## Memory Usage

```{r memory_usage}
mem_usage <- system('grep -Po "(?<=Free=)[0-9]+" logcat_VrApi.log', intern = TRUE)
data <- tibble(mem_usage) %>% mutate(mem_usage = 12288 - as.numeric(mem_usage)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=mem_usage)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```

## Temperature

```{r temperature}
temp <- system('grep -Po "(?<=Temp=)[0-9]+" logcat_VrApi.log', intern = TRUE)
data <- tibble(temp) %>% mutate(temp = as.numeric(temp)) %>% mutate(ts = 0:(n()-1)) %>% select(ts, everything())
data %>%
ggplot(aes(x = ts, y=temp)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```

## Network Usage

```{r parse_network_data}
network <- system('grep -P "\\s+wlan0\\W" net_dev.log | tr -s " " | sed -e \'s/^[[:space:]]*//\' -e \'s/\\n[[:space:]]*//\'', intern = TRUE)
data <- tibble(network) %>% separate(network, c("interface", "bytes_rx", "packets_rx", "errs_rx", "drop_rx", "fifo_rx", "frame_rx", "compressed_rx", "multicast_rx", "bytes_tx", "packets_tx", "errs_tx", "drop_tx", "fifo_tx", "colls_tx", "carrier_tx", "compressed_tx"), sep = " ", convert = TRUE) %>% mutate(ts = 0:(n()-1))
```

### Bytes Recv

<!-- Inter-| Receive | Transmit -->
<!-- face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed -->
```{r bytes_recv}
data %>%
mutate(bytes_rx = (bytes_rx - lag(bytes_rx)) / 1000) %>%
ggplot(aes(x = ts, y=bytes_rx)) +
geom_line() +
ylab("KB/s") +
ylim(0, NA) +
theme_half_open() + background_grid()
```

### Bytes Sent

```{r bytes_sent}
data %>%
mutate(bytes_tx = (bytes_tx - lag(bytes_tx)) / 1000) %>%
ggplot(aes(x = ts, y=bytes_tx)) +
geom_line() +
ylab("KB/s") +
ylim(0, NA) +
theme_half_open() + background_grid()
```

### Packets Recv

```{r packets_recv}
data %>%
mutate(packets_rx = packets_rx - lag(packets_rx)) %>%
ggplot(aes(x = ts, y=packets_rx)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```

### Packets Sent

```{r packets_sent}
data %>%
mutate(packets_tx = packets_tx - lag(packets_tx)) %>%
ggplot(aes(x = ts, y=packets_tx)) +
geom_line() +
ylim(0, NA) +
theme_half_open() + background_grid()
```
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading