for i in range(1, n): #choose a random starting node from the list of existing nodes nodes[i].depart() if property.SIM: print "Printing Experiment Results..." print "\n\n**********************OBSERVATIONS***********************" print "INPUT PARAMETERS:" print "NUMBER OF NODES, N="+str(n) print "NUMBER OF BITS USED IN NODEID/KEY HASHES, M="+str(M) print "\nSTATS:" Stats().print_stats() #print_ring(head) data_collector.collect(n) Stats().reset() n += property.N ################################################## FAULT INTRODUCTION AND SIMULATION ################################################## #1. Simulate a lookup just after deletion of few nodes nodeIdGenerator.flush() nodes = [] # Max number of bits = M M = int(math.log(n, 2)) + 1 #Add first node maxId = nodeIdGenerator.generate() head = Node(maxId, M)
for i in range(1, n): #choose a random starting node from the list of existing nodes nodes[i].depart() if property.SIM: print "Printing Experiment Results..." print "\n\n**********************OBSERVATIONS***********************" print "INPUT PARAMETERS:" print "NUMBER OF NODES, N=" + str(n) print "NUMBER OF BITS USED IN NODEID/KEY HASHES, M=" + str(M) print "\nSTATS:" Stats().print_stats() #print_ring(head) data_collector.collect(n) Stats().reset() n += property.N ################################################## FAULT INTRODUCTION AND SIMULATION ################################################## #1. Simulate a lookup just after deletion of few nodes nodeIdGenerator.flush() nodes = [] # Max number of bits = M M = int(math.log(n, 2)) + 1 #Add first node maxId = nodeIdGenerator.generate() head = Node(maxId, M)