diff options
| author | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-08-19 17:08:03 +0000 |
|---|---|---|
| committer | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-08-19 17:08:03 +0000 |
| commit | 13a6c1dc5fa444d5d8f2ad9bb1c75f997b468472 (patch) | |
| tree | 9904808310a2d6842223516dfca7ac1c79448772 /sources | |
| parent | 3af065114124d20d3b1f9430e731bf719d00c113 (diff) | |
| download | pacemaker-13a6c1dc5fa444d5d8f2ad9bb1c75f997b468472.tar.gz | |
git-svn-id: https://scm.gforge.inria.fr/svn/pacemaker@65 30fcff6e-8de6-41c7-acce-77ff6d1dd07b
Diffstat (limited to 'sources')
| -rw-r--r-- | sources/thibaut/pacemaker.ml | 4 | ||||
| -rw-r--r-- | sources/thibaut/plot.py | 22 |
2 files changed, 21 insertions, 5 deletions
diff --git a/sources/thibaut/pacemaker.ml b/sources/thibaut/pacemaker.ml index f634fa8..12d3597 100644 --- a/sources/thibaut/pacemaker.ml +++ b/sources/thibaut/pacemaker.ml @@ -116,8 +116,8 @@ let process_message oc current_round peer m = peer.nproofs <- peer.nproofs + 1 end; SlotArray.iter (send_message message) peer.slots; - peer.history <- RoundMap.add m.round - (seed, branch2) peer.history; + (*peer.history <- RoundMap.add m.round + (seed, branch2) peer.history;*) with | Not_found -> () with diff --git a/sources/thibaut/plot.py b/sources/thibaut/plot.py index aefa5ab..a4c847b 100644 --- a/sources/thibaut/plot.py +++ b/sources/thibaut/plot.py @@ -1,15 +1,31 @@ +# -*- coding: utf-8 -*- +from matplotlib import rc import numpy as np import matplotlib.pyplot as plt import sys import os import math - +#rc('text', usetex=True) +rc('font', family='serif') dirname = sys.argv[1] +a = np.array([1, 20, 176, 1493, 11135, 35572, 6279, 106.]) +b = np.array([1, 20, 176, 1278, 3312, 325, 2.]) +c = np.array([1, 20, 152, 338, 23., 0]) +plt.plot(a/sum(a),"k--",label="$10^5$ pairs") +plt.plot(b/sum(b),"k:", label="$10^4$ pairs") +plt.plot(c/sum(c),"k-", label="$10^3$ pairs") +plt.ylabel("Pourcentage de pairs") +plt.xlabel(u'Distance à la racine') +plt.legend(loc=2) +plt.savefig("mesh.eps",transparent=False) +plt.show() + """rounds = os.path.join(dirname, "rounds.data") a = np.loadtxt(rounds, unpack=True, usecols=(1,)) plt.plot(a) -plt.savefig(os.path.join(dirname, "rounds.png"))""" +plt.savefig(os.path.join(dirname, "rounds.png")) + plt.cla() sessions = os.path.join(dirname, "sessions.data") @@ -30,6 +46,6 @@ a,b = np.loadtxt(simul_sessions, unpack=True, usecols=(1,2)) plt.plot(a) plt.plot(b*10) plt.show() -#for i in xrange(len(duration)): +#for i in xrange(len(duration)):""" |
