added update_perf.py to do the same as the js file but in python