From 437f6d1c80e32a7234ff57a55bf51cae1fb80008 Mon Sep 17 00:00:00 2001 From: Xuan Gu <xuan.gu@liu.se> Date: Wed, 25 Jan 2023 11:15:35 +0000 Subject: [PATCH] Upload New File --- scripts/get_throughput.m | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 scripts/get_throughput.m diff --git a/scripts/get_throughput.m b/scripts/get_throughput.m new file mode 100644 index 0000000..2e8350c --- /dev/null +++ b/scripts/get_throughput.m @@ -0,0 +1,11 @@ +function [throughput] = get_throughput(result_dir) + +if isfile(result_dir) + json_str = fileread(result_dir); + throughput_train_position = strfind(json_str, 'throughput_train'); + latency_train_mean_position = strfind(json_str, 'latency_train_mean'); + throughput = str2double(json_str(throughput_train_position(end) + 19 : latency_train_mean_position(end)-4)); +else + throughput = 0; + +end \ No newline at end of file -- GitLab