Update the measure_loc.py tool to use a sampling profiler