Understanding and detecting real-world performance bugs