INNER CODE UNIT · TypeScript
getProcessorPath
eclipse-ditto/ditto · benchmark-tool/artillery-test/artillery.ts:23
function getProcessorPath(): string {
// This is due to artillery processor config accepts only filename to read the processor from,
// which can be .ts if built locally and .js if built in docker image
return process.env.NODE_ENV === 'docker' ? './processor.js' : './processor.ts';
}
const SCENARIO_FUNCTION_NAMES: Record<ScenarioName, string> = {
[WARMUP]: 'runWarmupIfEnabled',
[READ_THINGS]: 'runReadThings',
[SEARCH_THINGS]: 'runSearchThings',
[MODIFY_THINGS]: 'runModifyThings',
[DEVICE_LIVE_MESSAGES]: 'runDeviceLiveMessages'
};
export const config = {
target: getConfig().ditto.baseUri,
processor: getProcessorPath(),
phases: [