Page MenuHomePhabricator

D4580.id14775.diff
No OneTemporary

D4580.id14775.diff

diff --git a/services/commtest/tests/backup_performance_test.rs b/services/commtest/tests/backup_performance_test.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/backup_performance_test.rs
@@ -0,0 +1,7 @@
+#[path = "./lib/tools.rs"]
+mod tools;
+
+#[tokio::test]
+async fn backup_performance_test() {
+ assert!(false, "not implemented");
+}
diff --git a/services/commtest/tests/blob_performance_test.rs b/services/commtest/tests/blob_performance_test.rs
new file mode 100644
--- /dev/null
+++ b/services/commtest/tests/blob_performance_test.rs
@@ -0,0 +1,7 @@
+#[path = "./lib/tools.rs"]
+mod tools;
+
+#[tokio::test]
+async fn blob_performance_test() {
+ assert!(false, "not implemented");
+}
diff --git a/services/package.json b/services/package.json
--- a/services/package.json
+++ b/services/package.json
@@ -17,6 +17,7 @@
"run-all-services": "./scripts/run_all_services.sh",
"run-unit-tests": "./scripts/run_unit_tests.sh",
"run-integration-tests": "./scripts/run_integration_tests.sh",
+ "run-performance-tests": "./scripts/run_performance_tests.sh",
"run-all-services-in-sandbox": "COMM_SERVICES_SANDBOX=1 ./scripts/run_all_services.sh",
"init-local-cloud": "./scripts/init_local_cloud.sh",
"delete-local-cloud": "docker-compose down -v",
diff --git a/services/scripts/run_performance_tests.sh b/services/scripts/run_performance_tests.sh
new file mode 100755
--- /dev/null
+++ b/services/scripts/run_performance_tests.sh
@@ -0,0 +1,44 @@
+#!/usr/bin/env bash
+
+set -e
+
+SERVICES=$(./scripts/list_services.sh)
+
+run_performance_test () {
+ echo "performance tests tests will be run for the $1 service"
+ # add -- --nocapture in the end to enable logs
+ cargo test "$1"_performance_test --test '*' --manifest-path=commtest/Cargo.toml #-- --nocapture
+}
+
+list_expected () {
+ echo "Expected one of these:";
+ echo "$SERVICES";
+ echo "all";
+}
+
+if [[ -z "$1" ]]; then
+ echo "No service specified";
+ list_expected;
+ exit 1;
+fi
+
+if [[ "$1" == "all" ]]; then
+ for SERVICE in "$SERVICES"; do
+ run_performance_test "$SERVICE"
+ done
+ exit 0;
+fi;
+
+SERVICE=$(grep "$1" <<< "$SERVICES")
+
+if [[ "$SERVICE" != "$1" ]]; then
+ echo "No such service: $1";
+ list_expected;
+ exit 1;
+fi;
+
+set -o allexport
+source .env
+set +o allexport
+
+run_performance_test "$SERVICE"

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 5:56 PM (20 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2688585
Default Alt Text
D4580.id14775.diff (2 KB)

Event Timeline