-
Notifications
You must be signed in to change notification settings - Fork 873
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: moved some legacy benchmark logic to specific module
- Loading branch information
Showing
73 changed files
with
164 additions
and
562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
~ /* | ||
~ * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) | ||
~ * | ||
~ * 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. | ||
~ * | ||
~ * For more information: http://www.orientechnologies.com | ||
~ */ | ||
--> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.orientechnologies</groupId> | ||
<artifactId>orientdb-parent</artifactId> | ||
<version>4.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>orientdb-benchmarks</artifactId> | ||
|
||
<name>OrientDB Benchmarks</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.build.outputTimestamp>2023-01-01T00:00:00Z</project.build.outputTimestamp> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.orientechnologies</groupId> | ||
<artifactId>orientdb-test-commons</artifactId> | ||
<version>${project.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.orientechnologies</groupId> | ||
<artifactId>orientdb-client</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.orientechnologies</groupId> | ||
<artifactId>orientdb-core</artifactId> | ||
<version>${project.version}</version> | ||
<type>test-jar</type> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<profiles> | ||
<profile> | ||
<id>java17</id> | ||
<activation> | ||
<jdk>[17,)</jdk> | ||
</activation> | ||
<properties> | ||
<argLine> | ||
-Xmx${heapSize} | ||
-Dstorage.diskCache.bufferSize=4096 | ||
-Dmemory.directMemory.trackMode=true | ||
-Djava.util.logging.manager=com.orientechnologies.common.log.ShutdownLogManager | ||
-Dstorage.diskCache.checksumMode=storeAndThrow | ||
-Dsecurity.warningDefaultUsers=false | ||
--add-opens jdk.unsupported/sun.misc=ALL-UNNAMED | ||
--add-opens java.base/sun.security.x509=ALL-UNNAMED | ||
</argLine> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>secondary-tests</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>${surefire.version}</version> | ||
<configuration> | ||
<includes> | ||
<include>**/*ST.java</include> | ||
</includes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</profile> | ||
</profiles> | ||
|
||
</project> |
42 changes: 42 additions & 0 deletions
42
benchmarks/src/test/java/com/orientechnologies/common/test/BaseMemoryDatabase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.orientechnologies.common.test; | ||
|
||
import com.orientechnologies.orient.core.db.ODatabaseSession; | ||
import com.orientechnologies.orient.core.db.OrientDB; | ||
import com.orientechnologies.orient.core.db.OrientDBConfig; | ||
import org.junit.After; | ||
import org.junit.Before; | ||
|
||
public class BaseMemoryDatabase { | ||
|
||
protected ODatabaseSession db; | ||
protected OrientDB context; | ||
private String databaseName; | ||
|
||
@Before | ||
public void beforeTest() { | ||
context = new OrientDB("embedded:", OrientDBConfig.defaultConfig()); | ||
String dbName = this.getClass().getSimpleName(); | ||
dbName = dbName.replace('[', '_'); | ||
dbName = dbName.replace(']', '_'); | ||
this.databaseName = dbName; | ||
context | ||
.execute( | ||
"create database " | ||
+ this.databaseName | ||
+ " memory users(admin identified by 'adminpwd' role admin) ") | ||
.close(); | ||
db = context.open(this.databaseName, "admin", "adminpwd"); | ||
} | ||
|
||
protected void reOpen(String user, String password) { | ||
this.db.close(); | ||
this.db = context.open(this.databaseName, user, password); | ||
} | ||
|
||
@After | ||
public void afterTest() throws Exception { | ||
db.close(); | ||
context.drop(databaseName); | ||
context.close(); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...est/database/speed/IteratorSpeedTest.java → ...est/database/speed/IteratorSpeedTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.