Skip to content

Commit

Permalink
#5 df: some more refatorings. Put all specifications in the scenariot…
Browse files Browse the repository at this point in the history
…est-specs.json
  • Loading branch information
Daniel committed Aug 16, 2023
1 parent fe2b83f commit e151d11
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 69 deletions.
45 changes: 2 additions & 43 deletions src/components/ScenarioTestMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export default function ScenarioTestMenu(props) {
// Getting Scenario Test Definition Parameters from the Json
const allLoadDesigns = scenarioSpecs.load_design;
const allResilienceDesigns = scenarioSpecs.resilience_design;
const allModes = scenarioSpecs.mode;
const allMetrics = scenarioSpecs.metrics;
// const metrics = scenarioSpecs.metrics;
const settings = scenarioSpecs.settings;

Expand Down Expand Up @@ -92,49 +94,6 @@ export default function ScenarioTestMenu(props) {
}
});

const allModes = [{name: "What if", description: "Check your activity under specific conditions"}, {name: "Monitoring", description: "Monitor your activity in the context of expected behavior"}];

const [allMetrics, setAllMetrics] = useState([{
metric: "maximum_response_time",
description_begin: "What is the maximum time it may take for ",
description_end: null,
insert_to: true,
expected: [
{
value: 2,
unit: "Seconds"
},
{
value: 5,
unit: "Seconds"
},
{
value: 7,
unit: "Seconds"
}
]
},
{
metric: "minimum_throughput",
description_begin: "How often do at least ",
description_end: null,
insert_to: false,
expected: [
{
value: 1000,
unit: "Requests/Day"
},
{
value: 3000,
unit: "Requests/Day"
},
{
value: 7000,
unit: "Requests/Day"
}
]
}]);

const reactFlowInstance = useReactFlow();

const uniqueActivitys = props.edges.filter((obj, index, self) => {
Expand Down
66 changes: 40 additions & 26 deletions src/data/scenariotest-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,42 +203,56 @@
]
}
],
"metrics": [
"mode": [
{
"name": "Throughput",
"values": [
{
"name": "Slow",
"value": 1200
},
{
"name": "Normal",
"value": 2400
},
{
"name": "Fast",
"value": 3600
}
]
"name": "What if",
"description": "Check your activity under specific conditions"
},
{
"name": "Response Time",
"values": [
"name": "Monitoring",
"description": "Monitor your activity in the context of expected behavior"
}
],
"metrics": [{
"metric": "maximum_response_time",
"description_begin": "What is the maximum time it may take for ",
"description_end": null,
"insert_to": true,
"expected": [
{
"value": 2,
"unit": "Seconds"
},
{
"value": 5,
"unit": "Seconds"
},
{
"value": 7,
"unit": "Seconds"
}
]
},
{
"metric": "minimum_throughput",
"description_begin": "How often do at least ",
"description_end": null,
"insert_to": false,
"expected": [
{
"name": "Slow",
"value": 1200
"value": 1000,
"unit": "Requests/Day"
},
{
"name": "Normal",
"value": 2400
"value": 3000,
"unit": "Requests/Day"
},
{
"name": "Fast",
"value": 3600
"value": 7000,
"unit": "Requests/Day"
}
]
}
],
}],
"settings": {
"enviroment": [
"Productive",
Expand Down

0 comments on commit e151d11

Please sign in to comment.