mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-27 09:11:08 -06:00
package organization
This commit is contained in:
parent
a23808b36d
commit
2ab118f400
@ -106,11 +106,6 @@
|
||||
<artifactId>netty-handler</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- test scope only -->
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@ import io.nosqlbench.engine.api.activityimpl.SimpleActivity;
|
||||
import io.nosqlbench.engine.api.activityimpl.action.CoreActionDispenser;
|
||||
import io.nosqlbench.engine.api.activityimpl.motor.CoreMotorDispenser;
|
||||
import io.nosqlbench.engine.api.util.SimpleServiceLoader;
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
@ -20,7 +20,7 @@ package io.nosqlbench.engine.api.activityapi.cyclelog.filters;
|
||||
import io.nosqlbench.engine.api.activityapi.core.Activity;
|
||||
import io.nosqlbench.engine.api.util.SimpleConfig;
|
||||
import io.nosqlbench.engine.api.util.SimpleServiceLoader;
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
|
||||
import java.util.function.IntPredicate;
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
package io.nosqlbench.engine.api.activityapi.cyclelog.filters;
|
||||
|
||||
import io.nosqlbench.engine.api.util.SimpleServiceLoader;
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
|
||||
public interface ResultValueFilterType extends Named {
|
||||
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityapi.input;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.Activity;
|
||||
import io.nosqlbench.engine.api.util.SimpleServiceLoader;
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
|
||||
public interface InputType extends Named {
|
||||
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.engine.api.activityapi.output;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.Activity;
|
||||
import io.nosqlbench.engine.api.util.SimpleServiceLoader;
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
|
||||
public interface OutputType extends Named {
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.api.util;
|
||||
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
|
@ -7,9 +7,13 @@ import io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogIm
|
||||
import io.nosqlbench.engine.api.activityapi.input.InputType;
|
||||
import io.nosqlbench.engine.api.activityapi.output.OutputType;
|
||||
import io.nosqlbench.engine.api.metrics.ActivityMetrics;
|
||||
import io.nosqlbench.engine.core.*;
|
||||
import io.nosqlbench.engine.core.annotation.Annotators;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioErrorHandler;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenariosResults;
|
||||
import io.nosqlbench.engine.core.lifecycle.ShutdownManager;
|
||||
import io.nosqlbench.engine.core.logging.LoggerConfig;
|
||||
import io.nosqlbench.engine.core.metadata.MarkdownDocInfo;
|
||||
import io.nosqlbench.engine.core.metrics.MetricReporters;
|
||||
import io.nosqlbench.engine.core.script.MetricsMapper;
|
||||
import io.nosqlbench.engine.core.script.Scenario;
|
||||
|
@ -15,7 +15,7 @@
|
||||
* /
|
||||
*/
|
||||
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
public class ActivityExceptionHandler implements Thread.UncaughtExceptionHandler {
|
||||
|
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.*;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
@ -15,7 +15,7 @@
|
||||
* /
|
||||
*/
|
||||
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.RunState;
|
||||
import io.nosqlbench.engine.api.activityimpl.ProgressAndStateMeter;
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import org.apache.logging.log4j.LogManager;
|
@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.Activity;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActivityType;
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import org.graalvm.polyglot.PolyglotException;
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import com.codahale.metrics.ConsoleReporter;
|
||||
import com.codahale.metrics.MetricFilter;
|
@ -15,7 +15,7 @@
|
||||
* /
|
||||
*/
|
||||
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.lifecycle;
|
||||
|
||||
import io.nosqlbench.engine.core.script.Scenario;
|
||||
import io.nosqlbench.engine.core.script.ScenariosExecutor;
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.engine.core;
|
||||
package io.nosqlbench.engine.core.metadata;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActivityType;
|
||||
import io.nosqlbench.nb.api.content.Content;
|
@ -22,7 +22,7 @@ import com.codahale.metrics.graphite.Graphite;
|
||||
import com.codahale.metrics.graphite.GraphiteReporter;
|
||||
import io.nosqlbench.engine.api.activityapi.core.Shutdownable;
|
||||
import io.nosqlbench.engine.api.metrics.ActivityMetrics;
|
||||
import io.nosqlbench.engine.core.ShutdownManager;
|
||||
import io.nosqlbench.engine.core.lifecycle.ShutdownManager;
|
||||
import io.nosqlbench.engine.core.logging.Log4JMetricsReporter;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -19,10 +19,10 @@ import com.oracle.truffle.js.scriptengine.GraalJSScriptEngine;
|
||||
import io.nosqlbench.engine.api.extensions.ScriptingPluginInfo;
|
||||
import io.nosqlbench.engine.api.metrics.ActivityMetrics;
|
||||
import io.nosqlbench.engine.api.scripting.ScriptEnvBuffer;
|
||||
import io.nosqlbench.engine.core.ActivityProgressIndicator;
|
||||
import io.nosqlbench.engine.core.PolyglotScenarioController;
|
||||
import io.nosqlbench.engine.core.ScenarioController;
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ActivityProgressIndicator;
|
||||
import io.nosqlbench.engine.core.lifecycle.PolyglotScenarioController;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioController;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.annotation.Annotators;
|
||||
import io.nosqlbench.engine.core.metrics.PolyglotMetricRegistryBindings;
|
||||
import io.nosqlbench.nb.api.Layer;
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.IndexedThreadFactory;
|
||||
import io.nosqlbench.engine.core.ScenarioController;
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import io.nosqlbench.engine.core.lifecycle.IndexedThreadFactory;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioController;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenariosResults;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -12,6 +12,7 @@ import io.nosqlbench.engine.api.activityimpl.input.CoreInputDispenser;
|
||||
import io.nosqlbench.engine.api.activityimpl.input.AtomicInput;
|
||||
import io.nosqlbench.engine.api.activityimpl.motor.CoreMotor;
|
||||
import io.nosqlbench.engine.api.activityimpl.motor.CoreMotorDispenser;
|
||||
import io.nosqlbench.engine.core.lifecycle.ActivityExecutor;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.junit.Test;
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenariosResults;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -5,7 +5,7 @@ import io.nosqlbench.engine.cli.BasicScriptBuffer;
|
||||
import io.nosqlbench.engine.cli.Cmd;
|
||||
import io.nosqlbench.engine.cli.NBCLICommandParser;
|
||||
import io.nosqlbench.engine.cli.ScriptBuffer;
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.script.Scenario;
|
||||
import io.nosqlbench.engine.core.script.ScenariosExecutor;
|
||||
import io.nosqlbench.engine.rest.services.WorkSpace;
|
||||
|
@ -3,7 +3,7 @@ package io.nosqlbench.engine.rest.transfertypes;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
|
||||
import io.nosqlbench.engine.api.activityapi.core.ProgressMeter;
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.script.Scenario;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.engine.rest.transfertypes;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
|
||||
public class ResultView {
|
||||
|
||||
|
@ -57,6 +57,11 @@
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- perf testing -->
|
||||
|
||||
<dependency>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.engine.core.metrics;
|
||||
package io.nosqlbench.nb.api;
|
||||
|
||||
public enum OnError {
|
||||
Warn,
|
36
nb-api/src/main/java/io/nosqlbench/nb/api/SystemId.java
Normal file
36
nb-api/src/main/java/io/nosqlbench/nb/api/SystemId.java
Normal file
@ -0,0 +1,36 @@
|
||||
package io.nosqlbench.nb.api;
|
||||
|
||||
import oshi.SystemInfo;
|
||||
import oshi.hardware.HardwareAbstractionLayer;
|
||||
import oshi.hardware.NetworkIF;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class SystemId {
|
||||
public static String getNodeId() {
|
||||
SystemInfo sysinfo = new SystemInfo();
|
||||
HardwareAbstractionLayer hal = sysinfo.getHardware();
|
||||
List<NetworkIF> interfaces = hal.getNetworkIFs();
|
||||
Optional<String> first = interfaces.stream()
|
||||
.filter(i -> !i.getName().startsWith("docker" ))
|
||||
.filter(i -> !i.getName().equals("lo" ))
|
||||
.sorted((o1, o2) -> {
|
||||
if (o1.getName().startsWith("e" ) && o2.getName().startsWith("e" )) {
|
||||
return 0;
|
||||
}
|
||||
if (o1.getName().startsWith("e" )) {
|
||||
return -1;
|
||||
}
|
||||
if (o2.getName().startsWith("e" )) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
})
|
||||
.flatMap(iface -> Arrays.stream(iface.getIPv4addr().clone()))
|
||||
.filter(addr -> !(addr.startsWith("127." )))
|
||||
.findFirst();
|
||||
String systemID = first.orElse("UNKNOWN_SYSTEM_ID" );
|
||||
return systemID;
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.nb.api.annotations;
|
||||
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
|
||||
/**
|
||||
* An implementation of this type is responsible for taking annotation details and
|
||||
|
@ -1,4 +1,4 @@
|
||||
package io.nosqlbench.nb.spi;
|
||||
package io.nosqlbench.nb.api.spi;
|
||||
|
||||
public interface Named {
|
||||
/**
|
@ -0,0 +1,52 @@
|
||||
package io.nosqlbench.nb.api.config;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class MutableConfigModelTest {
|
||||
|
||||
@Test
|
||||
void optional() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testOptional() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void required() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testRequired() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void defaultto() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDefaultto() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void asReadOnly() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getElements() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void getOf() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void assertValidConfig() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void apply() {
|
||||
}
|
||||
}
|
@ -17,8 +17,8 @@
|
||||
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenariosResults;
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.ScenariosResults;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenariosResults;
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
package io.nosqlbench.engine.core.script;
|
||||
|
||||
import io.nosqlbench.engine.core.ScenarioResult;
|
||||
import io.nosqlbench.engine.core.lifecycle.ScenarioResult;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package io.nosqlbench.virtdata.core.bindings;
|
||||
|
||||
import io.nosqlbench.nb.spi.Named;
|
||||
import io.nosqlbench.nb.api.spi.Named;
|
||||
import io.nosqlbench.virtdata.lang.ast.Expression;
|
||||
import io.nosqlbench.virtdata.lang.ast.FunctionCall;
|
||||
import io.nosqlbench.virtdata.lang.parser.VirtDataDSL;
|
||||
|
Loading…
Reference in New Issue
Block a user