Revision 1a481d7b py_logs_visualizer.py

View differences:

py_logs_visualizer.py
287 287
def topologyVisualize(folder,save,sorting=None):
288 288
	print "My name is", inspect.stack()[0][3]
289 289
	filename=folder+"/edges.exp"
290
	levels=7
291 290
	if os.path.isfile(filename):
292 291
		edges = read_csv(filename)
293 292
		maxv = edges['weight'].max()
......
301 300
				chunkmat = correlateColumns(records,'peer_sender','peer_receiver','weight',defaultValue=0,autoValue=0)
302 301
			chunkmat.sort_index()
303 302
			chunkmat.sort_index(axis=1)
304
			plotHeatMap(chunkmat,maxv=maxv,min_color='w',xlab="Chunks sender",ylab="Chunks receiver")#,tit="Chunk exchanged among slivers in session "+str(session_id_shortner(session)))
303
			plotHeatMap(chunkmat,maxv=maxv,min_color='w',xlab="Chunks sender",ylab="Chunks receiver",tit="Chunk exchanged among slivers in session "+str(session_id_shortner(session)))
305 304
			if save:
306 305
				plt.savefig("chunkExchangedHeatMap_session_"+str(session_id_shortner(session))+ImageExtension,bbox_inches='tight')
307 306

  
308 307
#		# graph part
308
#			levels=7
309 309
#		# OCCHIO STO TAGLIANDO VIA UN SACCO DI ROBA!!
310 310
#			allweight = sum(records['weight'])
311 311
#			records=records[records['weight'] > records['weight'].median()*1.4]

Also available in: Unified diff