Studying the characteristics of logging practices in mobile apps: a case study on F-Droid

Studying the characteristics of logging practices in mobile apps: a case study on F-Droid
复制标题

DOI:
10.1007/s10664-019-09687-9
复制
发表时间:
2019-12-01
影响因子:
4.1
通讯作者:
Chen, Tse-Hsun (Peter)
Chen, Tse-Hsun (Peter)
中科院分区:
计算机科学2区
文献类型:
--
作者:
Zeng, Yi;Chen, Jinfu;Chen, Tse-Hsun (Peter)

文献摘要

被引文献

相似文献

日志记录是软件工程中的常见做法。先前的研究已经调查了系统软件中的日志记录实践的特征(例如,网络服务器或数据库)以及桌面应用程序。然而,尽管移动的应用程序很受欢迎,但人们对它们的日志记录做法知之甚少。在本文中,我们试图研究移动的应用程序中的日志记录实践。特别是,我们对F-Droid存储库中的1,444个开源Android应用程序进行了案例研究。通过定量研究,我们发现,虽然移动的应用程序日志不像服务器和桌面应用程序那么普遍,但几乎所有研究的应用程序都利用了日志。然而,我们发现移动的应用程序的日志记录实践与先前研究观察到的服务器和桌面应用程序的日志记录实践之间存在相当大的差异。为了进一步了解这种差异,我们进行了一个消防站的电子邮件采访和定性注释的理由使用日志在移动的应用程序开发。通过将每个日志记录语句的日志记录级别与开发人员使用日志的基本原理进行比较,我们发现,通常(35.4%),所选择的日志记录级别和基本原理不一致。这种不一致性可能会阻止有用的运行时信息被记录,或者可能会生成不必要的日志,这可能会导致性能开销。最后,为了了解这种性能开销的大小,我们在八个移动的应用程序中对生成所有日志和不生成任何日志进行了性能评估。一般来说,我们观察到基于各种性能指标(响应时间,CPU和电池消耗)的统计上显着的性能开销。此外,我们发现,如果在应用程序中观察到日志记录的性能开销,则禁用不必要的日志确实可以提供统计上显着的性能改进。我们的研究结果表明,需要一个系统的指导和自动化的工具支持,以协助移动的测井实践。
Logging is a common practice in software engineering. Prior research has investigated the characteristics of logging practices in system software (e.g., web servers or databases) as well as desktop applications. However, despite the popularity of mobile apps, little is known about their logging practices. In this paper, we sought to study logging practices in mobile apps. In particular, we conduct a case study on 1,444 open source Android apps in the F-Droid repository. Through a quantitative study, we find that although mobile app logging is less pervasive than server and desktop applications, logging is leveraged in almost all studied apps. However, we find that there exist considerable differences between the logging practices of mobile apps and the logging practices in server and desktop applications observed by prior studies. In order to further understand such differences, we conduct a firehouse email interview and a qualitative annotation on the rationale of using logs in mobile app development. By comparing the logging level of each logging statement with developers' rationale of using the logs, we find that all too often (35.4%), the chosen logging level and the rationale are inconsistent. Such inconsistency may prevent the useful runtime information to be recorded or may generate unnecessary logs that may cause performance overhead. Finally, to understand the magnitude of such performance overhead, we conduct a performance evaluation between generating all the logs and not generating any logs in eight mobile apps. In general, we observe a statistically significant performance overhead based on various performance metrics (response time, CPU and battery consumption). In addition, we find that if the performance overhead of logging is significantly observed in an app, disabling the unnecessary logs indeed provides a statistically significant performance improvement. Our results show the need for a systematic guidance and automated tool support to assist in mobile logging practices.