summaryrefslogtreecommitdiff
path: root/cli/bench/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/bench/main.rs')
-rw-r--r--cli/bench/main.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/bench/main.rs b/cli/bench/main.rs
index 48598a9b0..721cf06ab 100644
--- a/cli/bench/main.rs
+++ b/cli/bench/main.rs
@@ -17,6 +17,7 @@ include!("../util/time.rs");
mod http;
mod lsp;
+mod websocket;
fn read_json(filename: &str) -> Result<Value> {
let f = fs::File::open(filename)?;
@@ -401,6 +402,7 @@ struct BenchResult {
max_memory: HashMap<String, i64>,
lsp_exec_time: HashMap<String, i64>,
req_per_sec: HashMap<String, i64>,
+ ws_msg_per_sec: HashMap<String, f64>,
syscall_count: HashMap<String, i64>,
thread_count: HashMap<String, i64>,
}
@@ -416,6 +418,7 @@ async fn main() -> Result<()> {
"cargo_deps",
"lsp",
"http",
+ "websocket",
"strace",
"mem_usage",
];
@@ -455,6 +458,11 @@ async fn main() -> Result<()> {
..Default::default()
};
+ if benchmarks.contains(&"websocket") {
+ let ws = websocket::benchmark()?;
+ new_data.ws_msg_per_sec = ws;
+ }
+
if benchmarks.contains(&"bundle") {
let bundle_size = bundle_benchmark(&deno_exe)?;
new_data.bundle_size = bundle_size;