@gatling.io/core 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/package.json +4 -3
- package/target/assertions.d.ts +1 -1
- package/target/checks/multipleFind.d.ts +1 -1
- package/target/closedInjection.d.ts +94 -1
- package/target/closedInjection.js +21 -1
- package/target/feeders.d.ts +0 -11
- package/target/index.d.ts +17 -2
- package/target/index.js +16 -4
- package/target/openInjection.d.ts +140 -2
- package/target/openInjection.js +46 -1
- package/target/population.d.ts +3 -4
- package/target/population.js +2 -3
- package/target/protocol.d.ts +1 -2
- package/target/protocol.js +0 -1
- package/target/scenario.d.ts +12 -2
- package/target/scenario.js +7 -2
- package/target/session.d.ts +89 -0
- package/target/session.js +2 -1
- package/target/structure/asLongAs.d.ts +1 -2
- package/target/structure/asLongAs.js +1 -2
- package/target/structure/asLongAsDuring.d.ts +1 -2
- package/target/structure/asLongAsDuring.js +1 -2
- package/target/structure/choices.d.ts +2 -3
- package/target/structure/choices.js +0 -1
- package/target/structure/doIf.d.ts +2 -3
- package/target/structure/doIf.js +1 -2
- package/target/structure/doIfOrElse.d.ts +2 -3
- package/target/structure/doIfOrElse.js +1 -2
- package/target/structure/doSwitch.d.ts +1 -2
- package/target/structure/doSwitch.js +1 -2
- package/target/structure/doSwitchOrElse.d.ts +1 -2
- package/target/structure/doSwitchOrElse.js +1 -2
- package/target/structure/doWhile.d.ts +1 -2
- package/target/structure/doWhile.js +1 -2
- package/target/structure/doWhileDuring.d.ts +1 -2
- package/target/structure/doWhileDuring.js +1 -2
- package/target/structure/during.d.ts +1 -2
- package/target/structure/during.js +1 -2
- package/target/structure/errors.d.ts +1 -2
- package/target/structure/errors.js +1 -2
- package/target/structure/execs.d.ts +2 -3
- package/target/structure/execs.js +0 -1
- package/target/structure/feeds.d.ts +1 -2
- package/target/structure/feeds.js +1 -2
- package/target/structure/forEach.d.ts +1 -2
- package/target/structure/forEach.js +1 -2
- package/target/structure/forever.d.ts +0 -1
- package/target/structure/forever.js +0 -1
- package/target/structure/groups.d.ts +0 -1
- package/target/structure/groups.js +1 -2
- package/target/structure/index.d.ts +0 -1
- package/target/structure/index.js +0 -1
- package/target/structure/jvmStructureBuilder.d.ts +0 -1
- package/target/structure/jvmStructureBuilder.js +0 -1
- package/target/structure/paces.d.ts +1 -2
- package/target/structure/paces.js +1 -2
- package/target/structure/randomSwitch.d.ts +1 -2
- package/target/structure/randomSwitch.js +0 -1
- package/target/structure/randomSwitchOrElse.d.ts +1 -2
- package/target/structure/randomSwitchOrElse.js +0 -1
- package/target/structure/rendezVous.d.ts +0 -1
- package/target/structure/rendezVous.js +0 -1
- package/target/structure/repeat.d.ts +1 -2
- package/target/structure/repeat.js +1 -2
- package/target/structure/roundRobinSwitch.d.ts +1 -2
- package/target/structure/roundRobinSwitch.js +0 -1
- package/target/structure/uniformRandomSwitch.d.ts +1 -2
- package/target/structure/uniformRandomSwitch.js +0 -1
- package/target/throttling.d.ts +5 -3
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmDoWhileDuring = io.gatling.javaapi.core.loop.DoWhileDuring;
|
|
3
1
|
import { Duration } from "../utils/duration";
|
|
4
2
|
import { SessionTo } from "../session";
|
|
5
3
|
import { On } from "./on";
|
|
4
|
+
import JvmDoWhileDuring = io.gatling.javaapi.core.loop.DoWhileDuring;
|
|
6
5
|
export interface DoWhileDuringFunction<T extends DoWhileDuring<T>> {
|
|
7
6
|
/**
|
|
8
7
|
* Define a loop that will iterate as long as the condition holds true and a maximum duration
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.doWhileDuringImpl = void 0;
|
|
4
|
-
require("
|
|
4
|
+
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
5
|
const duration_1 = require("../utils/duration");
|
|
6
6
|
const session_1 = require("../session");
|
|
7
|
-
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
8
7
|
const on_1 = require("./on");
|
|
9
8
|
const doWhileDuringImpl = (jvmDoWhileDuring, wrap) => (condition, duration, arg2, arg3) => {
|
|
10
9
|
if (arg3 !== undefined && typeof arg2 === "string") {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmDuring = io.gatling.javaapi.core.loop.During;
|
|
3
1
|
import { Duration } from "../utils/duration";
|
|
4
2
|
import { SessionTo } from "../session";
|
|
5
3
|
import { On } from "./on";
|
|
4
|
+
import JvmDuring = io.gatling.javaapi.core.loop.During;
|
|
6
5
|
export interface DuringFunction<T extends During<T>> {
|
|
7
6
|
/**
|
|
8
7
|
* Define a loop that will iterate for a given duration. The condition is evaluated at the end of
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.duringImpl = void 0;
|
|
4
|
-
require("
|
|
4
|
+
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
5
|
const duration_1 = require("../utils/duration");
|
|
6
6
|
const session_1 = require("../session");
|
|
7
|
-
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
8
7
|
const on_1 = require("./on");
|
|
9
8
|
const duringImpl = (jvmDuring, wrap) => (duration, arg1, arg2) => {
|
|
10
9
|
if (arg2 !== undefined && typeof arg1 === "string") {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmErrors = io.gatling.javaapi.core.error.Errors;
|
|
3
1
|
import { SessionTo } from "../session";
|
|
4
2
|
import { On } from "./on";
|
|
3
|
+
import JvmErrors = io.gatling.javaapi.core.error.Errors;
|
|
5
4
|
export interface ExitBlockOnFailFunction<T extends Errors<T>> {
|
|
6
5
|
/**
|
|
7
6
|
* Define a block that is interrupted for a given virtual user if it experiences a failure.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.errorsImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
|
-
const session_1 = require("../session");
|
|
6
4
|
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
|
+
const session_1 = require("../session");
|
|
7
6
|
const on_1 = require("./on");
|
|
8
7
|
const errorsImpl = (jvmErrors, wrap) => ({
|
|
9
8
|
exitBlockOnFail: () => (0, on_1.wrapOn)(jvmErrors.exitBlockOnFail(), wrap),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "
|
|
1
|
+
import { Wrapper } from "../common";
|
|
2
|
+
import { SessionTransform } from "../session";
|
|
2
3
|
import JvmActionBuilder = io.gatling.javaapi.core.ActionBuilder;
|
|
3
4
|
import JvmExecs = io.gatling.javaapi.core.exec.Execs;
|
|
4
5
|
import JvmExecutable = io.gatling.javaapi.core.exec.Executable;
|
|
5
|
-
import { Wrapper } from "../common";
|
|
6
|
-
import { SessionTransform } from "../session";
|
|
7
6
|
export interface Executable<T extends JvmExecutable> extends Wrapper<T> {
|
|
8
7
|
}
|
|
9
8
|
export interface ActionBuilder extends Executable<JvmActionBuilder> {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.execImpl = exports.wrapActionBuilder = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const session_1 = require("../session");
|
|
6
5
|
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
7
6
|
const wrapActionBuilder = (_underlying) => ({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmFeeds = io.gatling.javaapi.core.feed.Feeds;
|
|
3
1
|
import { FeederBuilder } from "../feeders";
|
|
4
2
|
import { SessionTo } from "../session";
|
|
3
|
+
import JvmFeeds = io.gatling.javaapi.core.feed.Feeds;
|
|
5
4
|
export interface FeedFunction<T extends Feeds<T>> {
|
|
6
5
|
/**
|
|
7
6
|
* Attach a feed action.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.feedImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
|
-
const session_1 = require("../session");
|
|
6
4
|
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
|
+
const session_1 = require("../session");
|
|
7
6
|
const feedImpl = (jvmFeeds, wrap) => (feederBuilder, numberOfRecords) => {
|
|
8
7
|
if (typeof numberOfRecords === "number") {
|
|
9
8
|
return wrap(jvmFeeds.feed(feederBuilder._underlying, numberOfRecords));
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmForEach = io.gatling.javaapi.core.loop.ForEach;
|
|
3
1
|
import { SessionTo } from "../session";
|
|
4
2
|
import { On } from "./on";
|
|
3
|
+
import JvmForEach = io.gatling.javaapi.core.loop.ForEach;
|
|
5
4
|
export interface ForEachFunction<T extends ForEach<T>> {
|
|
6
5
|
/**
|
|
7
6
|
* Define a loop that will iterate over a list of values.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.foreachImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
|
-
const session_1 = require("../session");
|
|
6
4
|
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
|
+
const session_1 = require("../session");
|
|
7
6
|
const on_1 = require("./on");
|
|
8
7
|
const foreachImpl = (jvmForEach, wrap) => (seq, attributeName, counterName) => {
|
|
9
8
|
if (typeof seq === "function") {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.foreverImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const on_1 = require("./on");
|
|
6
5
|
const foreverImpl = (jvmForever, wrap) => (counterName) => (0, on_1.wrapOn)(counterName !== undefined ? jvmForever.forever(counterName) : jvmForever.forever(), wrap);
|
|
7
6
|
exports.foreverImpl = foreverImpl;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.groupImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
|
-
const session_1 = require("../session");
|
|
6
4
|
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
|
+
const session_1 = require("../session");
|
|
7
6
|
const on_1 = require("./on");
|
|
8
7
|
const groupImpl = (jvmGroups, wrap) => (group) => (0, on_1.wrapOn)(typeof group === "function" ? jvmGroups.group((0, callbacks_1.wrapCallback)((0, session_1.underlyingSessionTo)(group))) : jvmGroups.group(group), wrap);
|
|
9
8
|
exports.groupImpl = groupImpl;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stopInjectorIf = exports.stopInjector = exports.exitHereIfFailed = exports.exitHere = exports.exitHereIf = exports.tryMax = exports.exitBlockOnFail = exports.roundRobinSwitch = exports.uniformRandomSwitch = exports.randomSwitchOrElse = exports.randomSwitch = exports.doSwitchOrElse = exports.doSwitch = exports.doIfEqualsOrElse = exports.doIfEquals = exports.doIfOrElse = exports.doIf = exports.doWhileDuring = exports.asLongAsDuring = exports.doWhile = exports.asLongAs = exports.forever = exports.during = exports.foreach = exports.repeat = exports.rendezVous = exports.pace = exports.pause = exports.feed = exports.group = exports.exec = exports.percent = exports.onCase = exports.wrapActionBuilder = exports.structureBuilderImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const jvm_types_1 = require("@gatling.io/jvm-types");
|
|
6
5
|
const execs_1 = require("./execs");
|
|
7
6
|
const groups_1 = require("./groups");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmPaces = io.gatling.javaapi.core.pause.Paces;
|
|
3
1
|
import { Duration } from "../utils/duration";
|
|
4
2
|
import { SessionTo } from "../session";
|
|
3
|
+
import JvmPaces = io.gatling.javaapi.core.pause.Paces;
|
|
5
4
|
export interface PaceFunction<T extends Paces<T>> {
|
|
6
5
|
/**
|
|
7
6
|
* Attach a pace action
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.paceImpl = void 0;
|
|
4
|
-
require("
|
|
4
|
+
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
5
|
const duration_1 = require("../utils/duration");
|
|
6
6
|
const session_1 = require("../session");
|
|
7
|
-
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
8
7
|
const paceImpl = (jvmGroups, wrap) => (arg0, arg1, arg2) => {
|
|
9
8
|
if (arg2 !== undefined) {
|
|
10
9
|
// pace(min, max, counterName)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmRandomSwitch = io.gatling.javaapi.core.condition.RandomSwitch;
|
|
3
1
|
import { ChoiceWithWeight } from "./choices";
|
|
2
|
+
import JvmRandomSwitch = io.gatling.javaapi.core.condition.RandomSwitch;
|
|
4
3
|
export interface On<T> {
|
|
5
4
|
on(...choices: ChoiceWithWeight[]): T;
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmRandomSwitchOrElse = io.gatling.javaapi.core.condition.RandomSwitchOrElse;
|
|
3
1
|
import { ChoiceWithWeight } from "./choices";
|
|
4
2
|
import { Executable } from "./execs";
|
|
3
|
+
import JvmRandomSwitchOrElse = io.gatling.javaapi.core.condition.RandomSwitchOrElse;
|
|
5
4
|
export interface On<T> {
|
|
6
5
|
on(...choices: ChoiceWithWeight[]): OrElse<T>;
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.randomSwitchOrElseImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const wrapOn = (jvmOn, wrap) => ({
|
|
6
5
|
on: (...choices) => wrapOrElse(jvmOn.on(choices.map((c) => c._underlying)), wrap)
|
|
7
6
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rendezVousImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const rendezVousImpl = (jvmRendezVous, wrap) => (users) => wrap(jvmRendezVous.rendezVous(users));
|
|
6
5
|
exports.rendezVousImpl = rendezVousImpl;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmRepeat = io.gatling.javaapi.core.loop.Repeat;
|
|
3
1
|
import { SessionTo } from "../session";
|
|
4
2
|
import { On } from "./on";
|
|
3
|
+
import JvmRepeat = io.gatling.javaapi.core.loop.Repeat;
|
|
5
4
|
export interface RepeatFunction<T extends Repeat<T>> {
|
|
6
5
|
/**
|
|
7
6
|
* Define a loop that will iterate for a given number of times.
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.repeatImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
|
-
const session_1 = require("../session");
|
|
6
4
|
const callbacks_1 = require("../gatlingJvm/callbacks");
|
|
5
|
+
const session_1 = require("../session");
|
|
7
6
|
const on_1 = require("./on");
|
|
8
7
|
const repeatImpl = (jvmRepeat, wrap) => (times, counterName) => {
|
|
9
8
|
if (counterName !== undefined) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmRoundRobinSwitch = io.gatling.javaapi.core.condition.RoundRobinSwitch;
|
|
3
1
|
import { Executable } from "./execs";
|
|
2
|
+
import JvmRoundRobinSwitch = io.gatling.javaapi.core.condition.RoundRobinSwitch;
|
|
4
3
|
export interface On<T> {
|
|
5
4
|
on(executable: Executable<any>, ...executables: Executable<any>[]): T;
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.roundRobinSwitchImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const wrapOn = (jvmOn, wrap) => ({
|
|
6
5
|
on: (executable, ...executables) => wrap(jvmOn.on(executable._underlying, ...executables.map((e) => e._underlying)))
|
|
7
6
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "@gatling.io/jvm-types";
|
|
2
|
-
import JvmUniformRandomSwitch = io.gatling.javaapi.core.condition.UniformRandomSwitch;
|
|
3
1
|
import { Executable } from "./execs";
|
|
2
|
+
import JvmUniformRandomSwitch = io.gatling.javaapi.core.condition.UniformRandomSwitch;
|
|
4
3
|
export interface On<T> {
|
|
5
4
|
on(executable: Executable<any>, ...executables: Executable<any>[]): T;
|
|
6
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.uniformRandomSwitchImpl = void 0;
|
|
4
|
-
require("@gatling.io/jvm-types");
|
|
5
4
|
const wrapOn = (jvmOn, wrap) => ({
|
|
6
5
|
on: (executable, ...executables) => wrap(jvmOn.on(executable._underlying, ...executables.map((e) => e._underlying)))
|
|
7
6
|
});
|
package/target/throttling.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import JvmThrottleStep = io.gatling.javaapi.core.ThrottleStep;
|
|
2
|
-
import { Wrapper } from "./common";
|
|
3
1
|
import { Duration } from "./utils/duration";
|
|
2
|
+
import { Wrapper } from "./common";
|
|
3
|
+
import JvmThrottleStep = io.gatling.javaapi.core.ThrottleStep;
|
|
4
4
|
/**
|
|
5
5
|
* Bootstrap a new reachRps throttling profile, see {@link ThrottleStepReachIntermediate}
|
|
6
6
|
*
|
|
@@ -24,7 +24,9 @@ export declare const holdFor: (duration: Duration) => ThrottleStep;
|
|
|
24
24
|
export declare const jumpToRps: (target: number) => ThrottleStep;
|
|
25
25
|
export interface ThrottleStep extends Wrapper<JvmThrottleStep> {
|
|
26
26
|
}
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* DSL step to define the duration of a throttling ramp.
|
|
29
|
+
*/
|
|
28
30
|
export interface ThrottleStepReachIntermediate {
|
|
29
31
|
/**
|
|
30
32
|
* Define the duration of a throttling ramp
|