def test_nbody(iterations):
	SYSTEM = []
	for key in BODIES: SYSTEM.append( BODIES[key] )
	PAIRS = combinations(SYSTEM)

	times = []
	for _ in range(iterations):
		t0 = time()
		start_e = report_energy( SYSTEM, PAIRS )
		advance(0.01, 20000, SYSTEM, PAIRS)
		end_e = report_energy( SYSTEM, PAIRS )
		t1 = time()
		print('#start energy:', start_e)
		print('#end energy:', end_e)
		times.append(t1 - t0)
	return times
dataset/ETHPy150Open PythonJS/PythonJS/regtests/bench/nbody.py/test_nbody/original