Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 7d856680 authored by Romain Olivo's avatar Romain Olivo

doc + tuto

parent 59d76649
Pipeline #88565 passed with stages
in 4 minutes and 11 seconds
API
===
.. automodule::
.. automodule:: distem
:members:
:undoc-members:
API Documentation
=================
.. toctree::
:maxdepth: 2
:caption: Contents:
......
......@@ -174,10 +174,6 @@ texinfo_documents = [
# Document also the __init__
autoclass_content = "both"
rst_epilog = """
.. |enoslib| replace:: `EnOSlib <https://google.fr>`_
"""
extlinks = {
'desc': ('http://distem.gforge.inria.fr/doc/file.resources_desc.html#%s', '')
}
import logging
import time
import os
from statistics import mean, stdev
from distem import Distem
if __name__ == "__main__":
# List of nodes
nodelist = ['node-1', 'node-2']
# List of latencies for the experiment
latencies = ['0ms', '20ms', '40ms', '60ms']
# Dictionnary for the experiment
results = {
'scp': {},
'rsync': {}
}
node1 = {
'name': nodelist[0],
'address': []
}
node2 = {
'name': nodelist[1],
'address': []
}
# Name of interface
ifname = 'if0'
# Number of iteration for the experiment
iteration = 5
# Connect to the Distem server (on http://localhost:4567 by default)
distem = Distem()
# Getting the -automatically affected- address of each virtual nodes
# virtual network interfaces
node1['address'] = distem.viface_info(node1['name'], ifname)['address'].split("/")[0]
node2['address'] = distem.viface_info(node2['name'], ifname)['address'].split("/")[0]
# Creating the files we will use in our experimentation
distem.vnode_execute(node1['name'],
'mkdir -p /tmp/src ; cd /tmp/src ; \
for i in `seq 1 100`; do \
dd if=/dev/zero of=$i bs=1K count=50; \
done'
)
# Printing the current latency
start_time = time.time()
distem.vnode_execute(node1['name'], 'hsjvdjq')
print("Latency without any limitations # %s" %(str(time.time() - start_time)))
desc = {
'output': {
'latency': {
'delay': []
}
}
}
# Starting our experiment for each specified latencies
print('Starting tests')
for latency in latencies:
results['scp'][latency] = []
results['rsync'][latency] = []
print("Latency #%s" %str(latency))
# Update the latency description on virtual nodes
desc['output']['latency']['delay'] = latency
distem.viface_update(node1['name'], ifname, desc)
distem.viface_update(node2['name'], ifname, desc)
for i in range(iteration):
print("\tIteration ## %s" %i)
# Launch SCP test
# Cleaning target directory on node2
distem.vnode_execute(node2['name'], 'rm -rf /tmp/dst')
# Starting the copy from node1 to node2
start_time = time.time()
cmd = "scp -rq /tmp/src %s:/tmp/dst" % node2["address"]
distem.vnode_execute(node1['name'],
cmd,
)
end_time = time.time()
import ipdb; ipdb.set_trace()
results['scp'][latency].append(time.time() - start_time)
# Launch RSYNC test
# Cleaning target directory on node2
distem.vnode_execute(node2['name'], 'rm -rf /tmp/dst')
# Starting the copy from node1 to node2
start_time = time.time()
distem.vnode_execute(node1['name'],
"rsync -r /tmp/src #{node2['address']}:/tmp/dst"
)
results['rsync'][latency].append(time.time() - start_time)
values = []
print("Rsync results :")
for latency in latencies:
print(results['rsync'][latency])
print("%s: [average=%s,standard_deviation=%s]"
%(latency, mean(results['rsync'][latency]), stdev(results['rsync'][latency])))
values = []
print("Scp results :")
for latency in latencies:
print(results['scp'][latency])
print("%s: [average=%s,standard_deviation=%s]"
%(latency, mean(results['scp'][latency]), stdev(results['scp'][latency])))
......@@ -18,8 +18,8 @@ if __name__ == "__main__":
# of the virtual network to set-up in our platform
# This ruby hash table describes our virtual network
vnet = {
'name': 'mynetworkk',
'address': "10.158.0.0/22"
'name': 'testnet',
'address': ARGV[0]
}
nodelist = ['node-1', 'node-2']
# Read SSH keys
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment