Improved plan profile testdriver

Should we also buffer here as we do in the json function?