From fe9f46e0cf3c62e053a0e8a3ecbb7869e8c66d0f Mon Sep 17 00:00:00 2001
From: ToineSiebelink <toine.siebelink@est.tech>
Date: Thu, 1 Dec 2022 11:27:22 +0000
Subject: Enhance read performance tests

- Use cleaner base-data to prevent aready existing exception on generated IDs
- Increased sample size to 10K
- Test 3 scenarios now: get parent, get root and query as all 3 required separate perf improvements
- Adjusted Timing for new size (allowing approx 10% margin in Nordix build)

Issue-ID: CPS-1171

Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Id3867c8d33cd2c57d4d815c687561e23d1029bfd
---
 cps-ri/src/test/resources/data/perf-test.sql | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 cps-ri/src/test/resources/data/perf-test.sql

(limited to 'cps-ri/src/test/resources/data/perf-test.sql')

diff --git a/cps-ri/src/test/resources/data/perf-test.sql b/cps-ri/src/test/resources/data/perf-test.sql
new file mode 100644
index 000000000..5119f26b2
--- /dev/null
+++ b/cps-ri/src/test/resources/data/perf-test.sql
@@ -0,0 +1,28 @@
+/*
+   ============LICENSE_START=======================================================
+    Copyright (C) 2022 Nordix Foundation.
+   ================================================================================
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+   SPDX-License-Identifier: Apache-2.0
+   ============LICENSE_END=========================================================
+*/
+
+INSERT INTO DATASPACE (ID, NAME) VALUES (9001, 'PERF-DATASPACE');
+
+INSERT INTO SCHEMA_SET (ID, NAME, DATASPACE_ID) VALUES  (9002, 'PERF-SCHEMA-SET', 9001);
+
+INSERT INTO ANCHOR (ID, NAME, DATASPACE_ID, SCHEMA_SET_ID) VALUES (9003, 'PERF-ANCHOR', 9001, 9002);
+
+INSERT INTO FRAGMENT (ID, DATASPACE_ID, ANCHOR_ID, PARENT_ID, XPATH) VALUES  (0, 9001, 9003, null, '/perf-parent-1');
+
-- 
cgit 1.2.3-korg

