From 46b4325dbadee76ec57e70670f7f9084598eec0c Mon Sep 17 00:00:00 2001 From: hwwang Date: Tue, 6 Aug 2024 17:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BE=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/include/perf_window.h | 2 +- runtime/src/module.c | 1 - runtime/tests/batch_test.sh | 0 runtime/tests/batch_test2.sh | 0 runtime/tests/batch_test3.sh | 0 runtime/tests/debug.sh | 0 runtime/tests/generate_json.sh | 0 runtime/tests/generate_json_p80.sh | 0 runtime/tests/generate_json_single.sh | 0 runtime/tests/hey_test_8c.sh | 0 runtime/tests/hey_test_total_request.sh | 0 runtime/tests/kill_sledge.sh | 0 runtime/tests/one_test.sh | 0 runtime/tests/set_bash.sh | 3 ++- runtime/tests/set_cpu.sh | 0 runtime/tests/start-edf-broadcast.sh | 0 runtime/tests/start-edf-triaged.sh | 0 runtime/tests/start-edf.sh | 0 runtime/tests/start-srsf-broadcast.sh | 0 runtime/tests/start-srsf-p80.sh | 0 runtime/tests/start-srsf.sh | 0 runtime/tests/start.sh | 0 runtime/tests/start_monitor.sh | 0 runtime/tests/start_test.sh | 0 runtime/tests/start_test2.sh | 0 runtime/tests/start_test_compare2.sh | 0 runtime/tests/start_test_full.sh | 0 runtime/tests/stop_monitor.sh | 0 runtime/tests/test.sh | 0 runtime/tests/test2.sh | 0 runtime/tests/test_8c.sh | 0 runtime/tests/test_rps.sh | 0 runtime/tests/test_single_func.sh | 0 runtime/tests/test_total_request.sh | 0 runtime/tests/test_work1k.json | 14 -------------- runtime/tests/tmp_test.sh | 0 36 files changed, 3 insertions(+), 17 deletions(-) mode change 100644 => 100755 runtime/tests/batch_test.sh mode change 100644 => 100755 runtime/tests/batch_test2.sh mode change 100644 => 100755 runtime/tests/batch_test3.sh mode change 100644 => 100755 runtime/tests/debug.sh mode change 100644 => 100755 runtime/tests/generate_json.sh mode change 100644 => 100755 runtime/tests/generate_json_p80.sh mode change 100644 => 100755 runtime/tests/generate_json_single.sh mode change 100644 => 100755 runtime/tests/hey_test_8c.sh mode change 100644 => 100755 runtime/tests/hey_test_total_request.sh mode change 100644 => 100755 runtime/tests/kill_sledge.sh mode change 100644 => 100755 runtime/tests/one_test.sh mode change 100644 => 100755 runtime/tests/set_bash.sh mode change 100644 => 100755 runtime/tests/set_cpu.sh mode change 100644 => 100755 runtime/tests/start-edf-broadcast.sh mode change 100644 => 100755 runtime/tests/start-edf-triaged.sh mode change 100644 => 100755 runtime/tests/start-edf.sh mode change 100644 => 100755 runtime/tests/start-srsf-broadcast.sh mode change 100644 => 100755 runtime/tests/start-srsf-p80.sh mode change 100644 => 100755 runtime/tests/start-srsf.sh mode change 100644 => 100755 runtime/tests/start.sh mode change 100644 => 100755 runtime/tests/start_monitor.sh mode change 100644 => 100755 runtime/tests/start_test.sh mode change 100644 => 100755 runtime/tests/start_test2.sh mode change 100644 => 100755 runtime/tests/start_test_compare2.sh mode change 100644 => 100755 runtime/tests/start_test_full.sh mode change 100644 => 100755 runtime/tests/stop_monitor.sh mode change 100644 => 100755 runtime/tests/test.sh mode change 100644 => 100755 runtime/tests/test2.sh mode change 100644 => 100755 runtime/tests/test_8c.sh mode change 100644 => 100755 runtime/tests/test_rps.sh mode change 100644 => 100755 runtime/tests/test_single_func.sh mode change 100644 => 100755 runtime/tests/test_total_request.sh delete mode 100644 runtime/tests/test_work1k.json mode change 100644 => 100755 runtime/tests/tmp_test.sh diff --git a/runtime/include/perf_window.h b/runtime/include/perf_window.h index 431efa2..283c02c 100644 --- a/runtime/include/perf_window.h +++ b/runtime/include/perf_window.h @@ -149,7 +149,7 @@ perf_window_get_percentile(struct perf_window *self, int percentile, int precomp return 0; } - //if (likely(size >= PERF_WINDOW_BUFFER_SIZE)) return self->by_duration[precomputed_index].execution_time; + if (likely(size >= PERF_WINDOW_BUFFER_SIZE)) return self->by_duration[precomputed_index].execution_time; return self->by_duration[size * percentile / 100].execution_time; } diff --git a/runtime/src/module.c b/runtime/src/module.c index da8388a..a9bdd19 100644 --- a/runtime/src/module.c +++ b/runtime/src/module.c @@ -375,7 +375,6 @@ module_new_from_json(char *file_name) int module_count = 0; char *request_headers = NULL; char *reponse_headers = NULL; - //struct module *tail_module = NULL; struct module **nodes = malloc(JSON_MAX_ELEMENT_COUNT * sizeof(struct module*)); if (nodes == NULL) { panic("Memory allocation failed for nodes array\n"); diff --git a/runtime/tests/batch_test.sh b/runtime/tests/batch_test.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/batch_test2.sh b/runtime/tests/batch_test2.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/batch_test3.sh b/runtime/tests/batch_test3.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/debug.sh b/runtime/tests/debug.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/generate_json.sh b/runtime/tests/generate_json.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/generate_json_p80.sh b/runtime/tests/generate_json_p80.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/generate_json_single.sh b/runtime/tests/generate_json_single.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/hey_test_8c.sh b/runtime/tests/hey_test_8c.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/hey_test_total_request.sh b/runtime/tests/hey_test_total_request.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/kill_sledge.sh b/runtime/tests/kill_sledge.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/one_test.sh b/runtime/tests/one_test.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/set_bash.sh b/runtime/tests/set_bash.sh old mode 100644 new mode 100755 index a7a05e3..c717d50 --- a/runtime/tests/set_bash.sh +++ b/runtime/tests/set_bash.sh @@ -1 +1,2 @@ -sudo chsh -s /bin/bash xiaosuGW +sudo chsh -s /bin/bash hai + diff --git a/runtime/tests/set_cpu.sh b/runtime/tests/set_cpu.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start-edf-broadcast.sh b/runtime/tests/start-edf-broadcast.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start-edf-triaged.sh b/runtime/tests/start-edf-triaged.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start-edf.sh b/runtime/tests/start-edf.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start-srsf-broadcast.sh b/runtime/tests/start-srsf-broadcast.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start-srsf-p80.sh b/runtime/tests/start-srsf-p80.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start-srsf.sh b/runtime/tests/start-srsf.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start.sh b/runtime/tests/start.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start_monitor.sh b/runtime/tests/start_monitor.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start_test.sh b/runtime/tests/start_test.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start_test2.sh b/runtime/tests/start_test2.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start_test_compare2.sh b/runtime/tests/start_test_compare2.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/start_test_full.sh b/runtime/tests/start_test_full.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/stop_monitor.sh b/runtime/tests/stop_monitor.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test.sh b/runtime/tests/test.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test2.sh b/runtime/tests/test2.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test_8c.sh b/runtime/tests/test_8c.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test_rps.sh b/runtime/tests/test_rps.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test_single_func.sh b/runtime/tests/test_single_func.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test_total_request.sh b/runtime/tests/test_total_request.sh old mode 100644 new mode 100755 diff --git a/runtime/tests/test_work1k.json b/runtime/tests/test_work1k.json deleted file mode 100644 index bdf1c20..0000000 --- a/runtime/tests/test_work1k.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "active": true, - "name": "work1k", - "path": "work1k_wasm.so", - "port": 10000, - "relative-deadline-us": 50000, - "argsize": 1, - "http-req-headers": [], - "http-req-content-type": "text/plain", - "http-req-size": 1200, - "http-resp-headers": [], - "http-resp-size": 1200, - "http-resp-content-type": "text/plain" -} diff --git a/runtime/tests/tmp_test.sh b/runtime/tests/tmp_test.sh old mode 100644 new mode 100755