mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 07:34:31 -06:00
fixed empty runScenario method and made it final
This commit is contained in:
parent
f099fa0840
commit
bed3070495
@ -94,8 +94,8 @@ public class NBSceneBuffer implements NBSceneFixtures {
|
||||
return (NBSceneFixtures) this;
|
||||
}
|
||||
|
||||
// public static NBSceneBuffer init(String name) {
|
||||
// TestComponent root = new TestComponent("scene", "self");
|
||||
// return new NBSceneBuffer(NBDefaultSceneFixtures.ofDefault(name));
|
||||
// }
|
||||
public static NBSceneBuffer init(String name) {
|
||||
TestComponent root = new TestComponent("scene", "self");
|
||||
return new NBSceneBuffer(NBDefaultSceneFixtures.ofDefault(name));
|
||||
}
|
||||
}
|
||||
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023 nosqlbench
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package io.nosqlbench.engine.core.lifecycle.scenario.direct;
|
||||
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.engine.core.lifecycle.scenario.context.NBSceneFixtures;
|
||||
import io.nosqlbench.engine.core.lifecycle.scenario.execution.NBScenario;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class NBBaseScenario extends NBScenario {
|
||||
|
||||
public NBBaseScenario(NBComponent parentComponent, String scenarioName, Map<String, String> params, String progressInterval) {
|
||||
super(parentComponent, scenarioName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runScenario(NBSceneFixtures sctx) {
|
||||
}
|
||||
}
|
@ -54,4 +54,21 @@ public class ScenarioResult {
|
||||
public String getIOLog() {
|
||||
return fixtures.getIOLog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder("ScenarioResult [")
|
||||
.append(this.endedAt - this.startedAt)
|
||||
.append("ms]");
|
||||
if (exception==null) {
|
||||
sb.append(" OK ");
|
||||
} else {
|
||||
sb.append(" ERROR ").append(exception);
|
||||
}
|
||||
String iolog = getIOLog();
|
||||
if (!iolog.isEmpty()) {
|
||||
sb.append(" IO{\n").append("}\n").append(iolog);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
|
@ -27,21 +27,6 @@ public class SC_activity_error extends SCBaseScenario {
|
||||
super(parentComponent, scenarioName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runScenario(NBSceneFixtures shell) {
|
||||
|
||||
// HdrHistoLogPluginData hdrHistoLogPluginData = new HdrHistoLogPluginData();
|
||||
// HdrHistoLogPlugin histologplugin = hdrHistoLogPluginData.getExtensionObject(...);
|
||||
// histologplugin.logHistoIntervals(...);
|
||||
|
||||
// HdrHistoLogPlugin logplugin = shell.extensions().get("histologger",HdrHistoLogPlugin.class);
|
||||
|
||||
// var serviceojbect = extensions.get("histologger");
|
||||
|
||||
// AttachedMetricsSummaryReporter reporter = shell.runtime().create().summaryReporter(5, "labelname", "labelvalue");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Equivalent to javascript form:
|
||||
* <pre>{@code
|
||||
@ -73,7 +58,7 @@ public class SC_activity_error extends SCBaseScenario {
|
||||
);
|
||||
stdout.write("starting activity activity_error");
|
||||
controller.start(activitydef1);
|
||||
controller.waitMillis(2000);
|
||||
controller.waitMillis(500);
|
||||
controller.getActivityDef("activity_error").getParams().set("threads","unparsable"); // forced error
|
||||
controller.awaitActivity("activity_error", Long.MAX_VALUE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user