From bdb6aba550f53b16cd5034d9f54b1b298356d824 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 6 Mar 2023 10:37:56 -0500 Subject: [PATCH] Sandbox parallell websocket load tester Signed-off-by: Bill Erickson --- .../src/app/staff/sandbox/sandbox.component.html | 14 ++++++++++++++ .../eg2/src/app/staff/sandbox/sandbox.component.ts | 22 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html index 6127891a16..3231e29e82 100644 --- a/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html +++ b/Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html @@ -2,6 +2,20 @@ +
+
+ +
+
+ Sent = {{wsSent}}, received = {{wsReceived}} +
+
+ +
+
+ console.log('penalty value', val)); } + + testWebsockets() { + this.wsSent = 0; + this.wsReceived = 0; + this.wsDialog.update({value: 0}); + + while (this.wsSent < this.wsSendCount) { + this.wsSent++; + + // Firing requests in parallel + this.pcrud.retrieve('aou', 1).toPromise().then(o => { + this.wsReceived++; + this.wsDialog.increment(); + }); + } + } } -- 2.11.0