A Qualitative Study on Performance Bugs (MSR 2012)

42
Shahed Zaman Ahmed E. Hassan SAIL, Queen’s University A Qualitative Study on Performance Bugs Bram Adams MCIS, École Polytechnique de Montréal

description

Software performance is one of the important qualities that makes software stand out in a competitive market. However, in earlier work we found that performance bugs take more time to fix, need to be fixed by more experi- enced developers and require changes to more code than non-performance bugs. In order to be able to improve the resolution of performance bugs, a better understanding is needed of the current practice and shortcomings of reporting, reproducing, tracking and fixing performance bugs. This paper qualitatively studies a random sample of 400 performance and non-performance bug reports of Mozilla Firefox and Google Chrome across four dimensions (Impact, Context, Fix and Fix validation). We found that developers and users face problems in reproducing performance bugs and have to spend more time discussing performance bugs than other kinds of bugs. Sometimes performance regressions are tolerated as a trade- off to improve something else. http://sail.cs.queensu.ca/publications/pubs/MSR2012_Zaman.pdf

Transcript of A Qualitative Study on Performance Bugs (MSR 2012)

Page 1: A Qualitative Study on Performance Bugs (MSR 2012)

Shahed Zaman Ahmed E. HassanSAIL, Queen’s University

A Qualitative Study onPerformance Bugs

Bram%AdamsMCIS,&École&Polytechnique&de&Montréal

Page 2: A Qualitative Study on Performance Bugs (MSR 2012)

Bugs, Bugs, Bugs!

2

Costly Affect%

Reputa4on

Page 3: A Qualitative Study on Performance Bugs (MSR 2012)

Bugs, Bugs, Bugs!

2

482%bugs/week

Page 4: A Qualitative Study on Performance Bugs (MSR 2012)

Most%research%treats%all%bugs%equally!%

Does%this%make%sense?

Page 5: A Qualitative Study on Performance Bugs (MSR 2012)

Bugs, Bugs, Bugs!

4

Performance%Bugproblem&in&efficiency/speed&at&which&a&system&performs&at&runDEme=

Page 6: A Qualitative Study on Performance Bugs (MSR 2012)

5hHp://www.pcmag.com/arEcle2/0,2817,2325772,00.asp

systemEkilling%

performance%problems

Page 7: A Qualitative Study on Performance Bugs (MSR 2012)

Security versus Performance Bugs:

A Case Study on

Shahed&Zaman,&Bram&Adams,&Ahmed&E.&HassanSoUware&Analysis&and&Intelligence&Lab&(SAIL),&Queen’s&University

6

Page 8: A Qualitative Study on Performance Bugs (MSR 2012)

MSR%2011%Quan4ta4ve%Study

Performance&bugs&are&fixed&by&more&experienced&

developers

People

Performance&bug&fixes&are&more&complex

Bug%FixTime

&&&&&Performance&bugs&take&more%4me&to&fix

7

Page 9: A Qualitative Study on Performance Bugs (MSR 2012)

Why?

8

Page 10: A Qualitative Study on Performance Bugs (MSR 2012)

Shahed Zaman Ahmed E. HassanSAIL, Queen’s University

A Qualitative Study onPerformance Bugs

Bram%AdamsMCIS,&École&Polytechnique&de&Montréal

Page 11: A Qualitative Study on Performance Bugs (MSR 2012)

Chrome®

44,997%bugs

510%performance%bugs

295,198%bugs

7,603%performance%bugs

Performance%Bugs NonEperformance%bugs

100%Bugs

100%Bugs

=

200%Bugs

+

100%Bugs

100%Bugs

=

200%Bugs

+

Study Setup

Page 12: A Qualitative Study on Performance Bugs (MSR 2012)

11

bug%reports

‘slow’,%‘perf’,%

‘hang’

Our%heuris4cs%have:

100&±&10%%precision83&±&10%%recall

Our%heuris4cs%have:

90&±&10%%precision97&±&10%%recall

Page 13: A Qualitative Study on Performance Bugs (MSR 2012)

12

analyze

Page 14: A Qualitative Study on Performance Bugs (MSR 2012)

13

comments

bug%report

+%a]achments

Page 15: A Qualitative Study on Performance Bugs (MSR 2012)

14

update&taxonomyanalyze

think

Page 16: A Qualitative Study on Performance Bugs (MSR 2012)

14

IterativeProcess

update&taxonomyanalyze

think

Page 17: A Qualitative Study on Performance Bugs (MSR 2012)

4 Dimensions(20 subdimensions)

impact&on&the&user

context&of&the&bug

bug&fix

bug&fix&validaEon

Page 18: A Qualitative Study on Performance Bugs (MSR 2012)

4 Dimensions(20 subdimensions)

impact&on&the&user

context&of&the&bug

bug&fix

bug&fix&validaEon

Page 19: A Qualitative Study on Performance Bugs (MSR 2012)

Findings

is&regression

blocks&release

WFM&after&a&long&Time

People&Threaten&to&switch

0 5 10 15 20 25

PerformanceNonDPerf.

%

sta4s4cally%

significant%

difference

Page 20: A Qualitative Study on Performance Bugs (MSR 2012)

No Traceability

17

WorksForMe

Page 21: A Qualitative Study on Performance Bugs (MSR 2012)

Findings

is&regression

blocks&release

WFM&after&a&long&Time

scares&users&away

0 5 10 15 20 25

PerformanceNonDPerf.

%

Page 22: A Qualitative Study on Performance Bugs (MSR 2012)

4 Dimensions(20 subdimensions)

impact&on&the&user

context&of&the&bug

bug&fix

bug&fix&validaEon

Page 23: A Qualitative Study on Performance Bugs (MSR 2012)

Findingshas&measurements

has&test&cases

has&stack&traces

Replication&Problems

Reported&by&Member

Duplicate&Bugs

0 10 20 30 40 50 60

PerformanceNonDPerf.

%

Page 24: A Qualitative Study on Performance Bugs (MSR 2012)

21

automa4c%performance%

regression%tes4ng

Page 25: A Qualitative Study on Performance Bugs (MSR 2012)

21

automa4c%performance%

regression%tes4ngperformance&

regression&idenEfied&automaEcally

Page 26: A Qualitative Study on Performance Bugs (MSR 2012)

solicits%comparison%to%

other%browsers

22

Page 27: A Qualitative Study on Performance Bugs (MSR 2012)

Findingshas&measurements

has&test&cases

has&stack&traces

has&replication&problems

Reported&by&Member

Duplicate&Bugs

0 10 20 30 40 50 60

PerformanceNonDPerf.

%

Page 28: A Qualitative Study on Performance Bugs (MSR 2012)

Replication Problems

24

incomplete&report

<empty><moreempty>

plugins/addDons

Page 29: A Qualitative Study on Performance Bugs (MSR 2012)

Hard to Track Bugs ofExternal Applications

25

Page 30: A Qualitative Study on Performance Bugs (MSR 2012)

Findingshas&measurement&data

has&test&cases

has&stack&traces

has&replication&problems

is&reported&by&developer

is&a&duplicate

0 10 20 30 40 50 60

PerformanceNonDPerf.

%

Page 31: A Qualitative Study on Performance Bugs (MSR 2012)

4 Dimensions(20 subdimensions)

impact&on&the&user

context&of&the&bug

bug&fix

bug&fix&validaEon

Page 32: A Qualitative Study on Performance Bugs (MSR 2012)

Findings

has&discussion

Depends&on&Other&Bugs

Blocks&Other&Bugs

0 10 20 30 40 50

PerformanceNonDPerf.

%

Page 33: A Qualitative Study on Performance Bugs (MSR 2012)

Performance Bugs Require Collaboration

29

understand&the&problem

idenEfy&bug&fix

reach&consensus

me&too

Page 34: A Qualitative Study on Performance Bugs (MSR 2012)

Findings

has&discussion

depends&on&other&bug

blocks&other&bug

0 10 20 30 40 50

PerformanceNonDPerf.

%

Page 35: A Qualitative Study on Performance Bugs (MSR 2012)

Rebasing Performance

31

adjust&baseline

Page 36: A Qualitative Study on Performance Bugs (MSR 2012)

4 Dimensions(20 subdimensions)

impact&on&the&user

context&of&the&bug

bug&fix

bug&fix&validaEon

Page 37: A Qualitative Study on Performance Bugs (MSR 2012)

33

NO&difference&between&patch&discussions&and&reviews&of

performance&and&nonDperformance&bugs

Page 38: A Qualitative Study on Performance Bugs (MSR 2012)

is&regression + +blocks&release + +WFM&aUer&a&long&Eme + +scares&users&away + +

has&measurements + +has&test&cases + +contains&stacktrace + +has&replicaEon&problems + +is&reported&by&a&developer ? +is&a&duplicate E E

has&discussion + +depends&on&other&bug + +blocks&other&bug + E

impact&on&the&user

context&of&the&bug

bug&fix

Page 39: A Qualitative Study on Performance Bugs (MSR 2012)

is&regression + +blocks&release + +WFM&aUer&a&long&Eme + +scares&users&away + +

has&measurements + +has&test&cases + +contains&stacktrace + +has&replicaEon&problems + +is&reported&by&a&developer ? +is&a&duplicate E E

has&discussion + +depends&on&other&bug + +blocks&other&bug + E

impact&on&the&user

context&of&the&bug

bug&fix

Page 40: A Qualitative Study on Performance Bugs (MSR 2012)

MSR%2011%Quan4ta4ve%Study%(reprise)

Performance&bugs&are&fixed&by&more&experienced&

developers

Performance&bug&fixes&are&more&complex

&&&&&Performance&bugs&take&more%4me&to&fix

36

replication problems

more dependencies

more discussion

WFM after a long time

more release blocking

users leaving

Page 41: A Qualitative Study on Performance Bugs (MSR 2012)

Threats to Validity

37

human&bias

only&4&dimensions&&&20&subDdimensions

only&2&subjectsystems

‘slow’,%‘perf’,%

‘hang’

heurisEcs&for&performance&bug&idenEficaEon

Page 42: A Qualitative Study on Performance Bugs (MSR 2012)

Chrome®

44,997%bugs510%performance%bugs

295,198%bugs7,603%performance%bugs

Performance%Bugs NonEperformance%bugs

100%Bugs

100%Bugs=

200%Bugs

+100%Bugs

100%Bugs=

200%Bugs

+

Study Setup

no traceability

no reproducabilitydiscussion!

4 Dimensions(20 subdimensions)

impact&on&the&user

context&of&the&bug

bug&fix

bug&fix&validaEon

is&regression + +blocks&release + +WFM&aUer&a&long&Eme + +scares&users&away + +has&measurements + +has&test&cases + +contains&stacktrace + +has&replicaEon&problems + +is&reported&by&a&developer ? +is&a&duplicate E Ehas&discussion + +depends&on&other&bug + +blocks&other&bug + E

impact&on&the&user

context&of&the&bug

bug&fix

MSR%2011%Quan4ta4ve%Study%(reprise)Performance&bugs&are&fixed&

by&more&experienced&developers

Performance&bug&fixes&are&more&complex

&&&&&Performance&bugs&take&more%4me&to&fix

37

replication problems

more dependencies

more discussion

WFM after a long time

more release blocking

users leaving