perf-test fix client and worker examples, move stuff to util.py