Analysing traces for performance bottlenecks