Revision 1a481d7b py_logs_analizer.py

View differences:

py_logs_analizer.py
184 184
				else:
185 185
					edges[hostnames2key([sender[i],receiver[i]])] = 1
186 186
		for edge in edges.keys():
187
#			print edge
188
			host1 = exp.addr2hostname(key2hostnames(edge)[0])
189
			host2 = exp.addr2hostname(key2hostnames(edge)[1])
190
#			print str(host1) + ' ' + str(host2)
187 191
			out_file.write("EDGE,"+str(session.time)+","+ \
188
					purify_hostname(exp.addr2hostname(''.join(key2hostnames(edge)[0].split(':')[:-1])))+","+ \
189
					purify_hostname(exp.addr2hostname(''.join(key2hostnames(edge)[1].split(':')[:-1])))+","+ \
192
					purify_hostname(host1)+","+ \
193
					purify_hostname(host2)+","+ \
190 194
					str(edges[edge])+"\n")
191 195

  
192 196
	out_file.close()
......
206 210
				maxs = data.groupby("addr").max()
207 211

  
208 212
				for i in range(0,len(avgs)):
209
					dst = purify_hostname(exp.addr2hostname(avgs.ix[i].name))
213
					dst = purify_hostname(exp.addr2hostname(avgs.ix[i].name,without_port=True))
210 214
					rtt = avgs.ix[i]['rtt']
211 215
					mdev = avgs.ix[i]['mdev']
212 216
					out_file.write("RTT_AVG,"+sliver+","+dst+","+str(rtt)+","+str(mdev)+"\n")
213 217

  
214 218
				for i in range(0,len(maxs)):
215
					dst = purify_hostname(exp.addr2hostname(avgs.ix[i].name))
219
					dst = purify_hostname(exp.addr2hostname(avgs.ix[i].name,without_port=True))
216 220
					rtt = maxs.ix[i]['rtt']
217 221
					mdev = maxs.ix[i]['mdev']
218 222
					out_file.write("RTT_MAX,"+sliver+","+dst+","+str(rtt)+","+str(mdev)+"\n")

Also available in: Unified diff