GithubHelp home page GithubHelp logo

mhjort / clojider Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 4.0 61 KB

AWS Lambda powered, distributed load testing tool for Clojure

License: Apache License 2.0

Clojure 100.00%
aws-lambda load-testing

clojider's People

Contributors

mhjort avatar petterik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clojider's Issues

Bump clj-gatling version to 0.8.5

Hey @mhjort , thanks for merging my PR on the clj-gatling side, would you mind bumping the version here, and releasing a new Clojider too when you get a chance? We'd really like to use the new scenario specific context in our tests. Thanks! :)

Setup issue -- The role defined for the function cannot be assumed by Lambda

Hi, I am trying to set up Clojider and keep running into this issue with the IAM Roles.

Creating role clojider-role-us-east-1 with policy clojider-policy-us-east-1
clojider already exists. Skipping creation.
Uploading code to S3 from target/try-clojider-0.1.0-SNAPSHOT.jar
Creating Lambda function clojider-load-testing-lambda to region us-east-1
Exception in thread "main" com.amazonaws.services.lambda.model.InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda. (Service: AWSLambda; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: fa3482ad-2d7c-11e8-aa56-29beccbd238b), compiling:(/private/var/folders/f9/s61lc0fn6ss1_fsy7f1yhg2h0000gn/T/form-init7247895295587934841.clj:1:125)
	at clojure.lang.Compiler.load(Compiler.java:7391)
	at clojure.lang.Compiler.loadFile(Compiler.java:7317)
	at clojure.main$load_script.invokeStatic(main.clj:275)
	at clojure.main$init_opt.invokeStatic(main.clj:277)
	at clojure.main$init_opt.invoke(main.clj:277)
	at clojure.main$initialize.invokeStatic(main.clj:308)
	at clojure.main$null_opt.invokeStatic(main.clj:342)
	at clojure.main$null_opt.invoke(main.clj:339)
	at clojure.main$main.invokeStatic(main.clj:421)
	at clojure.main$main.doInvoke(main.clj:384)
	at clojure.lang.RestFn.invoke(RestFn.java:421)
	at clojure.lang.Var.invoke(Var.java:383)
	at clojure.lang.AFn.applyToHelper(AFn.java:156)
	at clojure.lang.Var.applyTo(Var.java:700)
	at clojure.main.main(main.java:37)

This was run with:

lein run install -r us-east-1 -b clojider -f target/try-clojider-0.1.0-SNAPSHOT.jar

I am have the region set in ~/.aws/config

[default]
region = us-east-1

and credentials at ~/.aws/credentials.

Thanks,
Jonathan

Failing on Lambda due to missing Class

Thanks for Clojider and clj-gatling!

I run into the following exception when trying to run my own simulations on Lambda:

Caused by: java.lang.ClassNotFoundException: scala.collection.mutable.HashMap
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at clojure.lang.RT.classForName(RT.java:2211)
	at clojure.lang.RT.classForNameNonLoading(RT.java:2224)
	at clojider_gatling_highcharts_reporter.generator$loading__5569__auto____1078.invoke(generator.clj:1)
	at clojider_gatling_highcharts_reporter.generator__init.load(Unknown Source)
	at clojider_gatling_highcharts_reporter.generator__init.<clinit>(Unknown Source)

This is from the Lambda logs. On the client where I init the run, it surfaces like this:

$ lein run load-lambda -r eu-west-1 -b nblumoe-load-testing -c 1 -d 6 -s nblumoe.gatling/read-only-simulation
Running simulation nblumoe.gatling/read-only-simulation with options {:concurrency 1, :nodes 1, :timeout 5000, :duration #object[org.joda.time.Seconds 0x3ec8c874 PT6S], :region eu-west-1, :bucket nblumoe-load-testing, :simulation nblumoe.gatling/read-only-simulation}
Starting AWS Lambda executor with id: 0
Invoking Lambda for node: 0
nblumoe-load-testing already exists. Skipping creation.
Downloading nil from nblumoe-load-testing
Parsing log file(s)...
19:13:42.770 [main] INFO  i.g.c.result.reader.FileDataReader - Collected List() from input
Syntax error (IllegalArgumentException) compiling at (/private/var/folders/rm/7dw9bw5d5pj7lg41n5j77mww0000gn/T/form-init6743625326106399828.clj:1:125).
requirement failed: simulation directory doesn't contain any log file.

I have :uberjar-exclusions [#"scala.*"] in the project.clj and updates the standalone jar on S3.

I don't get the error from above when a run an example simulation though:

$ lein run load-lambda -r eu-west-1 -b nblumoe-load-testing -c 1 -d 6 -s clojider.examples/ping-simulation

Am I missing something in my setup?

Use Fargate for runtime

So this is more of an idea, but Fargate could provide a ~easy runtime without the 5 minute hard upper limit of execution time in AWS Lambda.

Make lambda install idempotent

If you have to delete a function, you are currently also forced to go and delete the role and policy so that the install function can work again.

If the code that sets up the role and policy could be made idempotent, then the whole install procedure can be idempotent.

This would also remove the need for a separate update call. Alternatively, the update call could idempotently create the function first, and we leave install alone.

Add support for setup/teardown

Setup/teardown could be used for some warm-up tasks. For example the last tests I wrote use following pattern

  1. Create some test data to database
  2. Run the load tests
  3. Remove test data

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.