Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Simplified loads-broker config #101

Open
rpappalax opened this issue Mar 3, 2017 · 3 comments
Open

Simplified loads-broker config #101

rpappalax opened this issue Mar 3, 2017 · 3 comments

Comments

@rpappalax
Copy link

rpappalax commented Mar 3, 2017

To simplify test runs, it would be better if we used some other format instead of json (with defaults).

It would also be cool if you could flag "steps" (in this case runs) to be synchronous vs. asynchronous, so you don't have to add staggered run_delays (which only approximate true synchronous activity).

Example TOML format:

name = "Loadtest: Antenna Loadtesting"


[[defaults]]
    volume_mapping = "/var/log:/var/log/:rw"
    docker_series = "antenna_tests"
    instance_region = "us-east-1" 
    instance_type = "c4.2xlarge" 
    container_name = "firefoxtesteng/antenna-loadtests:latest" 
    run_max_time = 600 

    [[defaults.environment_data]]
	URL_SERVER = "https://antenna-loadtest.stage.mozaws.net"
	VERBOSE = ""
	TEST_PROCESSES = 1
	TEST_DURATION = 300
	TEST_CONNECTIONS = 1

[[plans]]
    name = "THRESHOLD TEST"
    description = "Ratchet up test load from below error threshold to above."

    [[plans.steps]]
        name = "***************** WARMUP ***********************"
        instance_count = 2 
	TEST_DURATION = 600

    [[plans.steps]]
        name = "***************** RUN #01 ***********************"
        instance_count = 1 
	TEST_DURATION = 300

    [[plans.steps]]
        name = "***************** RUN #02 ***********************"
        instance_count = 2 
	TEST_DURATION = 300

    [[plans.steps]]
        name = "***************** RUN #03 ***********************"
        instance_count = 4 
	TEST_DURATION = 300

    [[plans.steps]]
        name = "***************** RUN #04 ***********************"
        instance_count = 8 
	TEST_DURATION = 300
@pjenvey
Copy link
Member

pjenvey commented Mar 3, 2017

I also want to move away from JSON, the lack of comments being the biggest pain point IMO. YAML's an obvious alternative but I'd also like to consider what a TOML version would look like.

@rpappalax
Copy link
Author

@pjenvey yea, looks like TOML is more or less like INI except that it allows for nesting via indents:
https://github.com/toml-lang/toml

I've updated my example above in TOML format reflecting the true nesting of the env vars.

@rpappalax
Copy link
Author

import toml
import pprint


CONF_BROKER = './loads-broker.toml'

pp = pprint.PrettyPrinter(indent=4)
with open(CONF_BROKER) as conffile:

    config = toml.loads(conffile.read())

pp.pprint(config)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants