GithubHelp home page GithubHelp logo

Comments (3)

NelsonVides avatar NelsonVides commented on June 8, 2024

Hi @mikebluestein
I think that if running under docker, you might need to inject this my_scenario into your container, and compile it within. Have a look at this script, you could use it as ./script.sh 2 my_scenario.erl, it might help:

#!/usr/bin/env bash

NODES=${1:-2}
FILE_PATH="${2:-my_scenario.erl}"
FILE=`basename ${FILE_PATH} .erl`

for i in $(seq 1 $NODES); do
    NODE="amoc-${i}"
    echo "cp file ${FILE} from path ${FILE_PATH} to node ${NODE}"
    docker cp ${FILE_PATH} ${NODE}:/home/amoc/amoc/scenarios
    docker exec -it $NODE /home/amoc/amoc/bin/amoc eval "compile:file(\"scenarios/${FILE}\", [{outdir, \"scenarios_ebin\"}, {parse_transform, lager_transform}])."
    docker exec -it $NODE /home/amoc/amoc/bin/amoc eval "code:add_patha(\"scenarios_ebin\"), code:purge(${FILE}), code:load_file(${FILE})."
done

So you basically first docker cp the file into the container, then tell the Erlang vm to compile it and to load it, and then amoc can find it and use it 🙂

from amoc.

DenysGonchar avatar DenysGonchar commented on June 8, 2024

dear @mikebluestein.

According to rebar.config it should be compiled and available for execution. But please note that Dockerfile runs "git clean -ffxd" as part of docker image build, so all the non-tracked (by git) files are removed.

anyway, we do not recommend to add scenarios directly to amoc project. the latest release was fully focused on splitting amoc and scenarios, and making amoc just a pure loadtesting framework.

now you can use amoc as rebar dependency, and have a separate dedicated project with your scenarios. Like it's done for amoc-arsenal-xmpp.

we highly recommend to go this way.

from amoc.

DenysGonchar avatar DenysGonchar commented on June 8, 2024

@mikebluestein please close the issue if you have no other questions.

from amoc.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.