Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Logging library migrations - A case study for the Apache Software Foundation projects

292 views

Published on

MSR 2016 presentation

Published in: Science
  • Be the first to comment

  • Be the first to like this

Logging library migrations - A case study for the Apache Software Foundation projects

  1. 1. Logging Library MigrationsLogging Library Migrations Suhas Kabinna, Cor-Paul Bezemer,Weiyi Shang,Ahmed E. Hassan A Case Study for theA Case Study for the Apache Software Foundation ProjectsApache Software Foundation Projects
  2. 2. 2 Logging statements generate output about the execution of a program function fun(){ log(“In fun()”); // ... log(“Leave fun()”); }
  3. 3. 3 Logging statements generate output about the execution of a program function fun(){ log(“In fun()”); // ... log(“Leave fun()”); } [13:40:00] In fun() [13:40:05] Leave fun()
  4. 4. 4 The usage of logging evolves Printf / system.out.println 1990s
  5. 5. 5 The usage of logging evolves Printf / system.out.println Logging levels Centralized output location 1990s 2002
  6. 6. 6 The usage of logging evolves Printf / system.out.println Logging levels Centralized output location Using several libraries in the same project 1990s 2002 2004
  7. 7. 7 The usage of logging evolves Printf / system.out.println Logging levels Centralized output location Using several libraries in the same project All previous features in one library 1990s 2002 2004 2010
  8. 8. 8 Logging library migration requires effort Propose
  9. 9. 9 Logging library migration requires effort Propose Plan
  10. 10. 10 Logging library migration requires effort Propose Plan Implement
  11. 11. 11 Developers migrate to newer logging libraries 1. How often do they migrate?
  12. 12. 12 Developers migrate to newer logging libraries 1. How often do they migrate? 2.Why do they migrate?
  13. 13. 13 Developers migrate to newer logging libraries 1. How often do they migrate? 2.Why do they migrate? 3.What is the performance impact of such migration?
  14. 14. 14 We study logging library migrations in Java projects 223 Java projects 450 JIRA issues related to logging
  15. 15. 15 How often do developers migrate their logging libraries? 49 attempts identified in JIRA 33 projects successfully migrated (at least once)
  16. 16. 16 14 migration attempts were abandoned Mostly because nobody stepped up to make the required changes, or the developers did not agree on the value of the migration
  17. 17. 17 Migrations can lead to problems 24 out of 33 projects encounter an average of 2 post-migration bugs due to the migration
  18. 18. 18 Why do developers migrate their logging libraries? 1. Flexibility 57.4% 2. Performance 37.0% 3. Code maintenance 33.3% Based on manual tagging of JIRA issues that are related to logging library migration (multiple tags per issue possible)
  19. 19. 19 Was the migration justified? We calculate the time to generate output of one logging statement pre and post-migration
  20. 20. Calculating the time it takes to generate output for one logging statement Project Run test without logging Execution time without logging
  21. 21. Calculating the time it takes to generate output for one logging statement Project Run test without logging Execution time with logging Run test with logging Execution time without logging # of generated logs
  22. 22. Calculating the time it takes to generate output for one logging statement Project Run test without logging Execution time with logging Run test with logging Execution time without logging Logging time # of generated logs
  23. 23. Calculating the time it takes to generate output for one logging statement Project Run test without logging Execution time with logging Run test with logging Execution time without logging Logging time Time per log# of generated logs
  24. 24. 24 Was the migration justified? Project pre-migration Run test Pre-migr. execution time
  25. 25. 25 Was the migration justified? Project pre-migration Project post-migration Run test Post-migr. execution time Run test Pre-migr. execution time
  26. 26. 26 Was the migration justified? Project pre-migration Project post-migration Compare Run test Post-migr. execution time Run test Pre-migr. execution time
  27. 27. 27 There is a 28-44% speedup of logging after migration
  28. 28. 28 There is a 28-44% speedup of logging after migration However… in 2 out of 3 projects this speedup is only noticeable at debug level (so NOT in practice!)
  29. 29. Logging library migration requires effort Propose Plan Implement
  30. 30. 30
  31. 31. 31 Migrations can lead to problems 24 out of 33 projects encounter an average of 2 post-migration bugs due to the migration
  32. 32. 32
  33. 33. 33 Why do developers migrate their logging libraries? 1. Flexibility 57.4% 2. Performance 37.0% 3. Code maintenance 33.3%
  34. 34. 34
  35. 35. 35 There is a 28-44% speedup of logging after migration However… in 2 out of 3 projects this speedup is only noticeable at debug level (so NOT in practice!)
  36. 36. 36
  37. 37. 37 Cor-Paul Bezemer bezemer@cs.queensu.ca http://sailhome.cs.queensu.ca/~corpaul/
  38. 38. 38

×