summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test
AgeCommit message (Collapse)AuthorFilesLines
2023-03-30Update performance test timingsdanielhanrahan2-28/+28
Issue-ID: CPS-1524 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iaa8e9a0ca3170a2b487df312834245d609fdfe13
2023-03-21Query data nodes across all anchors under one dataspacerajesh.kumar3-2/+62
Issue-ID: CPS-1396 Change-ID: I73f97f986a817d423f93a8d922dcd9647b1412ab Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-03-13Fetch fragment entities using recursive SQL querydanielhanrahan3-24/+42
- Add SQL query that can fetch needed fragments to any given depth - Update getFragmentEntities to use new query - Remove now unused FragmentRepositoryMultiPathQuery - Remove unused TempTableCreator method - Result: getDataNodesForMultipleXpaths is up to 10 times faster Issue-ID: CPS-1525 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I07cbc9da5ab994ce7e0c2b02d7ca05089f05dab0
2023-03-13Reduce dataspace/anchor lookups in CpsDataPersistenceServicedanielhanrahan2-51/+27
- Remove unneeded calls to DataspaceRepository::getByName - Remove unneeded calls to AnchorRepository::getByDataspaceAndName - Refactor FragmentRepository Issue-ID: CPS-1536 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I2121f6247070ee4a7c000e06ec66a6278b758540
2023-03-13Make single deleteDataNode use plural deleteDataNodesdanielhanrahan2-19/+18
- Make deleteDataNode and deleteListDataNode call deleteDataNodes - Add onlySupportListDeletion option to deleteDataNodes to support original deleteListDataNode behaviour - Allow delete root xpath in deleteDataNodes - Fix incorrect use of PathParsingException in deleteDataNode - Update performance tests timings Issue-ID: CPS-1523 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I92c3c3ce606a5ab2cb8e6779d1ee0f9853529982
2023-03-09Create Base and Sample Performance Integration TestsToineSiebelink2-33/+33
- added data (folders) for different models and json data - added base and data for cps-ncmp (registry) specific test cases - integrated Ahila's (large) openroadm model and data (corrected version provided by Lee Anjella) - created profiles to exclude/include *PerfTest - fixed dependency test check - included integration test for overall coverage - increased margings in existing perf test to reduce nordix intermitten failures Issue-ID: CPS-1516 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ia82826f610636c14aa7e8939b385c278e5039817
2023-03-01Add DataNodeNotFoundException to deleteDataNodesdanielhanrahan2-15/+26
Current implementation of NCMP handle de-registration relies on DataNodeNotFoundException being thrown to report errors. - Make deleteDataNodes throw DataNodeFoundExceptionBatch - Update performance test timings Issue-ID: CPS-1481 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib833bdb4a23d24e1784bdaf4e5e5e8a9acb41c54
2023-02-28Skip deleting list xpaths that are list elementsdanielhanrahan1-5/+2
List elements cannot be lists. Filtering list elements before trying to delete lists by xpaths doubles performance when deleting list elements (which doubles performance of CM handle de-registration). Issue-ID: CPS-1511 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ieb6002212d006396d468f27f853708b5aa1e31f2
2023-02-24Improve performance for update data nodesdanielhanrahan2-13/+38
- Extract method getFragmentEntities from getDataNodes - Remove unused code from getFragmentEntity - Use bulk getFragmentEntities in updateDataNodesAndDescendants - Update performance test timings Issue-ID: CPS-1504 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Icd2c6a0e6009e152de43090cbc23a21349703da2
2023-02-22Add performance tests for update data nodesdanielhanrahan2-8/+52
Issue-ID: CPS-1504 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1356e4a67a40d03cd71a98dad1571583229f414d
2023-02-21Improve performance of deleteDataNodes SQLdanielhanrahan1-8/+8
- Use SQL IN operator instead of temp table when deleting nodes - Use Postgresql LIKE ANY array operator when deleting lists - Update delete perf test timings - Refactor adding cascade delete constraint Issue-ID: CPS-1502 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ic90b867e7c71ec1981f05a9122322ece84dd8bde
2023-02-20Update performance test timingsdanielhanrahan2-23/+23
- Tighten delete perf test timings - Fix timings for getDataNodes Issue-ID: CPS-1502 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib89a70ef90b1b30e2720e48ebfb66650a2fafa12
2023-02-20Merge "CPS-1401 Implement V2 of GET Data Node API"Luke Gleeson5-81/+99
2023-02-17CPS-1401 Implement V2 of GET Data Node APIarpitsingh5-81/+99
- Modified the GET Data Node API so it returns all the data nodes when xpath set to root "/" - Fragment Repository now returns a collection of Fragment Entities - Instead of returning only the first Fragment Entity now all fragment entities are returned when xpath is set to root - The Fragemnt Entities are further processed to a Collection of Data Nodes. As opposed to singular Data Node in current implementation. - Finally the DataRestController also returns a Collection of Data Nodes when xpath is set to root and valid data is present - Response body changed from JSON object to JSON Array. - Exception handling for invalid xpath and non-existing xpath is now done separately at persistence layer. - Refactored code against CPS-1422 - Deprecated getDataNode method from Service and Persistence layer - Modified V1 of Get Data Node API to use the getDataNodes method and get the first data node from the collection returned. - Modified NCMP to use getDataNodes method - NCMP still does not support multiple data nodes. It retrieves the first data node from the collection returned by getDataNodes Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I494a5740a53f65376d135fcb9f1e2e8900a2803e
2023-02-16Improve batch delete schemasets performancedanielhanrahan4-10/+56
- Bulk delete anchors and datanodes associated with schemasets. Improves de-registration performance by approx 10% Issue-ID: CPS-1423 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie38e8b4c64356bf5935d8c7a5d3f5bfa73fb1714
2023-02-15Bulk delete schemasets in CM handle deregistrationdanielhanrahan2-3/+30
- Batch delete schema sets in single query - Call deleteUnusedYangResourceModules once per batch, not per CM handle - Results for deregistering 10k: 14 mins before; 6 mins after Issue-ID: CPS-1423 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia3a86a0dc88677323e2f386253a99022a7f02603
2023-02-01Create plural version of deleteDataNodedanielhanrahan3-45/+139
- Add method to CpsDataService to batch delete data nodes and lists - Use native queries to batch delete fragment entities by xpaths, for data nodes and lists - Add performance tests for batch delete - Refactor FragmentNativeRepository - Add single-column version of createTemporaryTable - Renamed metric cps.data.service.datanode.batch.delete to cps.data.service.datanode.all.delete Issue-ID: CPS-1438 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1851f9c7ef0b1be4bd421b3352d9697a2dd23f79
2023-01-31Introduce InstrumentationToineSiebelink3-21/+46
- Add instrumentation related dependency - Added Timed Instrumentation - CPS-Service Crud methods - CPS Yang parsing - NCMP Registration methods - NCMP Events handling - Remove manual Gauge for YanResources Cache as (better!) instrumentation is already built into the 3PP - Sorted dependecies alphabetically (as we used to enforce, to prevent duplicates) - Added ## P E R F O R M A N C E T E S T R E S U L T S ### mini report - (unrelated) test improvement (because of bug that turned out to be invalid) Reviewers: Sourabh,Priyank, Luke Issue-ID: CPS-1457 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I34b20bece2f59488b022b8effa9470704c57be4d
2023-01-24Handle root xpaths in getDataNodesdanielhanrahan2-2/+6
Issue-ID: CPS-1458 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I64abf97317afe4335c8d04169689ee1396e75860
2023-01-23Use native query to delete data nodessourabh_sourabh2-11/+14
- Used hashcode to remove child fragment based on it's xpath - Used native query to delete fragment by altering fragment_parent_id_fkey CONSTRAINT. Issue-ID: CPS-1439 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: If19c449818e18f8fd666503b7346704eeb4a95d0 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-01-23Merge "Added depth parameter in query nodes API."Toine Siebelink1-5/+9
2023-01-23Added depth parameter in query nodes API.rajesh.kumar1-5/+9
Issue-ID: CPS-1381 Change-ID: I73f97f986a817d423f93a8d922dcd9647b1206bb Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-01-19Normalize xpaths for getDataNodesdanielhanrahan3-16/+47
Issue-ID: CPS-1457 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I93d19666c168aa69da73eadbfef0fc54181aec52
2023-01-17Add delete performance testsdanielhanrahan3-78/+236
- move existing delete tests to new class - add tests for deleting lists and list elements - add test for deleting root node Issue-ID: CPS-1437 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I81228aa9473ed28d550db64b28c38abb1c1016f5
2023-01-16Merge "Fetch CM handles by collection of xpaths"Sourabh Sourabh3-20/+63
2023-01-11Fetch CM handles by collection of xpathsseanbeirne3-20/+63
- Added FragmentRepositoryMultiPathQuery - Removed Hibernate method for same - Added perf. test - Handle escaping of single qoutes in sql-data - Increased timing for path paser performance test Issue-ID: CPS-1422 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Ibea12a44bffd29ed43cc1560b507d1fa7e968b8b
2023-01-11CPS PATCH operation does not merge existing datalukegleeson1-0/+19
Altered code to add attributes and not overwrite attributes + tests Issue-ID: CPS-1442 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: I23c5f6a65b98ea1b05af62a38a874c228cc82067
2023-01-05Add delete performance testsdanielhanrahan1-1/+37
Issue-ID: CPS-1437 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If940d7633ab6f85b6e1e311af7077ce2006cfa6a
2022-12-23Organize performance testToineSiebelink1-2/+2
- Separated CpsPathUtil performance tests in dedicated file - Used smaller sample to speed up CpsPathUtil test - Increased margin on CpsModuleReferenceRepository performance test to rpevent accidental failures - Added profiles to cps path parser module - Use Regex to include any (future) perforamcne test using same naming Issue-ID: CPS-1421 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I9da1614b6f067e946a4f088c6417479fa6c71988
2022-12-22Temp Table Creation improvementsToineSiebelink3-17/+120
- extracted methods for more generic temp table creation - optimized - added perf test on use case that depends on temp table creation - had some doubts about stopwatch use in recent tests, but was all OK, just renamed some Issue-ID: CPS-1422 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I22cabb9b0ba1b0aa8576a2d756d77af46eebc1b0
2022-12-21CpsPath Query OptimizationToineSiebelink1-14/+12
- Optimized CpsPathqueries with descendants that only care about the xpath (no attribuets checks) - Use native query with regular expression for target xpath and descendants - Refactored so existing sql-geneartion code can be re-used in different repository implementations - Adjusted related performance test expectations Issue-ID: CPS-1421 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I3a807a14478c4b3272a5335d31c9aa3615eb2bee
2022-12-19Fix Delete uses case with '/' in pathToineSiebelink1-5/+31
-Extend and use cpsPath parser (util) classes instead of regex Issue-ID: CPS-1409 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I230c9eb71cc34264983830b39149511b95c4b4a6
2022-12-16Merge "CPS-341 Support for multiple data tree instances under 1 anchor"Toine Siebelink2-52/+73
2022-12-15CPS-341 Support for multiple data tree instances under 1 anchorarpitsingh2-52/+73
- Updated the parseJsonData method so it can parse JSON with multiple data trees, now it returns a ContainerNode - ContainerNode holds a collection of NormalizedNodes - Updated DataNodeBuilder and FragmentRepository as well to support collection of NormalizedNodes - Added new methods in CpsDataPersistenceService to store multiple Data Nodes - Added new test cases - Updated existing test cases and fixed code coverage - Addressed comments from previous patch Issue-ID: CPS-341 Change-Id: Ie893e91c0fbfb139a1a406e962721b0f52412ced Signed-off-by: arpitsingh <as00745003@techmahindra.com>
2022-12-12Query OptimizationToineSiebelink1-26/+49
- Refactor performance tests as multiple separate (data driven) tests - This to improve redability and re-use and amke sure al tets are always ran (makign it easier to test/change thresholds for multiple scenarios at once) - Add new query performance tests (on many descendants) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: If5703fcb9e2233ded64d31d2342de2e7f5549687
2022-12-12Increase performance test marginsleventecsanyi1-8/+8
- Increased duration times Issue-Id: CPS-1420 Change-Id: I510801a65194b63ce72a716ee3fc7258aef61207 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2022-12-09Merge "Added API to get all schema sets for a given dataspace."Toine Siebelink1-0/+10
2022-12-09Added API to get all schema sets for a given dataspace.rajesh.kumar1-0/+10
Issue-ID: CPS-1187 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0914aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-12-02Enhance read performance testsToineSiebelink2-19/+70
- 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
2022-11-22Merge "Performance Test settings exploration"Toine Siebelink1-4/+4
2022-11-18Performance Test settings explorationseanbeirne1-4/+4
Issue-ID: CPS-1351 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: I91624b74fc712078a22b9dc18851ca0b5de6a911
2022-11-18Added get APIs for dataspace.rajesh.kumar1-0/+28
Issue-ID: CPS-1186 Change-ID: I73f97f986a817d423f93a8d922dcd9647b0829aa Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2022-11-11Merge "Node API - Find root by anchor method performance"Toine Siebelink3-23/+25
2022-11-11Node API - Find root by anchor method performancesourabh_sourabh3-23/+25
- Modified findFirstRootByAnchor - Used fragment extract to build fragment entity to get root data node. Reviewers : Toine, Priyank and Joe Issue-ID: CPS-1171 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I843f270e4781f91ae496f39b976e2a7f2a14d55e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-11-11Temporary registry updatempriyank1-2/+3
- temporarily updating the registry to test the failing tests. Issue-ID: CPS-1360 Change-Id: I7e303bb72b3f87565e27bcca7b1d9f5afc2b1417 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2022-11-08Node API - GET Method performance issuesourabh_sourabh2-13/+14
- Modified toDataNode call based on fetch descendants option. - Used fragment extract to build fragment entity. - Modified data set to have correct parent id for descendants. Reviewers : Toine, Priyank and Joe Issue-ID: CPS-1171 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: I27a537fe72dd396722e6cfde7d8c454ed2579ec0 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2022-11-04CPS-RI performance profiles implementaionseanbeirne1-4/+3
Reviewers: Joe, Levente, Luke Issie-ID: CPS-1351 Signed-off-by: seanbeirne <sean.beirne@est.tech> Change-Id: Ia7b9a4bbf103d6b54f6fde9dd2d80a3c825c3046
2022-11-02Ensure prefix is correct module prefixToineSiebelink5-134/+36
- Moved Prefix logic from RI to Service layer - Prefix is no PREFIX propety, not the moduel name! == RI (DB Layer) Changes - Removed prefix logic incl hazelcast - Added new basic ri-test for getDataNode and assert prefix is null - Updated exsiting ri-test to us getDataNode - Updated existing ri-test to only use " where really needed == CPS Service Layer Changes - Introduced PrefixResolver with clear and limited responsibility - Use PrefixResolver where needed - Cache prefix map per anchor, use cached entry when available - Disabled SONAR on new Regex == REST Layer - Use PrefixResolver where needed Issue-ID: CPS-1353 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ie16f0e1ee1c280f3eb69c9e64fab69a780fb692a
2022-10-27Read Performance Improvement - Using Native QueryToineSiebelink4-58/+49
- Native query for FragmentExtracts - Convert FragmentExtracts to tree of FragmentEntity - Native Query now used for all Gets with descendants (orignal hibernate option only used when descendanst ommited) - Added error handling for not-found on native query - Ommit descendants by default on many udpate use-cases (this might have a signifcant perf. improvemnt impact too) - Improved legacy tests for delete use-cases - Corrected performace test expectation - Fix TTL test realizing TTL resolution is whole seconds! Issue-ID: CPS-1301 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I658ac1b7b7036f01050f30bdf9e5bd175725ef1d
2022-10-26Creation of DataNodeBuilder with module name prefix is very slowToineSiebelink5-4/+110
- Created a new hazelcast distributed cache for anchor data config use cases. - Module name prefix is added for root data node only. - Cached module name prefix by anchor name on demand from database at first call. - Introduced a new cache holder to have module name prefix of diff. levels. Issue-ID: CPS-1326 Change-Id: I9072f5efdeea59843cd827ac556d3c0547a3a0cf Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Signed-off-by: mpriyank <priyank.maheshwari@est.tech>