events and timeouts
This commit is contained in:
parent
1e3b0d7634
commit
23e13ad43c
@ -2,9 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Project Evaluation\n",
|
||||
"\n",
|
||||
@ -14,9 +12,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Setup\n",
|
||||
"This section sets up the required variables for the Proxmox server."
|
||||
@ -46,9 +42,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Testing\n",
|
||||
"This section gathers the required data from the different structures for later graphs."
|
||||
@ -122,9 +116,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Direct Server to Server"
|
||||
]
|
||||
@ -151,9 +143,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Local Portal with 2 Interfaces"
|
||||
]
|
||||
@ -175,7 +165,7 @@
|
||||
" run_and_save_test(env, StandardTest([2,2], bandwidth_variation_target=0.2 if fast_tests else 0.05))\n",
|
||||
" run_and_save_test(env, StandardTest(\n",
|
||||
" [2,2],\n",
|
||||
" events={10: (0,1), 15: (0,2)},\n",
|
||||
" events={10: (0,1), 20: (0,2)},\n",
|
||||
" duration=30,\n",
|
||||
" interval_variation_target=0.8 if fast_tests else 0.5,\n",
|
||||
" ))\n",
|
||||
@ -185,9 +175,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Local Portal with 3 Interfaces"
|
||||
]
|
||||
@ -212,9 +200,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Local Portal with 4 Interfaces"
|
||||
]
|
||||
@ -239,9 +225,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Graphs\n",
|
||||
"This section produces graphs from the collected data."
|
||||
@ -269,9 +253,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Section 4.2: Graphs\n",
|
||||
"#### Subsection 4.2.2 Line Graphs\n",
|
||||
@ -350,9 +332,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### More than 2 connections evaluation"
|
||||
]
|
||||
@ -401,9 +381,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Mixed Performance Evaluation"
|
||||
]
|
||||
@ -431,9 +409,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Eventful Evaluation"
|
||||
]
|
||||
@ -459,9 +435,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Comparisons to a Direct Connection"
|
||||
]
|
||||
@ -554,9 +528,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Mixed Performance Evaluation"
|
||||
]
|
||||
@ -584,9 +556,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Eventful Evaluation"
|
||||
]
|
||||
@ -612,9 +582,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Comparisons to a Direct Connection"
|
||||
]
|
||||
@ -691,7 +659,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.6"
|
||||
"version": "3.9.0"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
@ -1,5 +1,5 @@
|
||||
from itertools import cycle
|
||||
from typing import Dict
|
||||
from typing import Dict, Union
|
||||
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
|
@ -142,13 +142,13 @@ class ProxmoxRunner:
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=8) as executor:
|
||||
build_futures = [executor.submit(self._build_node, node) for node in nodes]
|
||||
for future in build_futures:
|
||||
future.result()
|
||||
future.result(300)
|
||||
|
||||
# guarantee that setup is not called until all of the nodes are built
|
||||
# this means that all will have their final IPs by this point
|
||||
setup_futures = [executor.submit(self._setup_node, node) for node in nodes]
|
||||
for future in setup_futures:
|
||||
future.result()
|
||||
future.result(300)
|
||||
|
||||
def _await_task(self, upid, timeout=10):
|
||||
t1 = datetime.now()
|
||||
|
@ -40,11 +40,9 @@ class BaseEnvironment:
|
||||
rated_node.get_interfaces()[i].set_rate(r)
|
||||
server.server()
|
||||
|
||||
for t, (iface, rate) in test.events.items():
|
||||
threading.Timer(
|
||||
6 + t,
|
||||
(lambda n: lambda: n.get_interfaces()[iface].set_rate(rate))(rated_node),
|
||||
)
|
||||
for delay, (index, rate) in test.events.items():
|
||||
iface = rated_node.get_interfaces()[index]
|
||||
threading.Timer(6 + delay, iface.set_rate, args=[rate]).start()
|
||||
|
||||
iperf = client.client(server, time=test.duration)
|
||||
if old is None:
|
||||
@ -57,7 +55,7 @@ class BaseEnvironment:
|
||||
if val.num_tests < 3:
|
||||
return False
|
||||
return val.bandwidth_coefficient_variance() < test.bandwidth_variation_target and False not in \
|
||||
[x < test.interval_variation_target for x in val.interval_coefficient_variances().values()]
|
||||
[x < test.interval_variation_target for x in val.interval_coefficient_variances().values()]
|
||||
|
||||
result = repeat_until_satisfied(
|
||||
test_reducer,
|
||||
|
Loading…
Reference in New Issue
Block a user