码迷,mamicode.com
首页 > 移动开发 > 详细

一个有趣的安卓软件异常统计

时间:2015-01-10 08:52:49      阅读:261      评论:0      收藏:0      [点我收藏+]

标签:android   软件开发   

统计背景:

为提高编码质量,把软件开发过程中出现的bug提交上个人网站,年度终结,给它做个统计。

统计项目:1个上线项目,3个开发中项目,1个私人项目

项目开发人员:作者本人、同行5人

项目主题:电商、系统应用

信息收集日期:2014-08-13 20:37:54(捕获第一个异常)到2015-01-10 00:19:36(统计时最后一个异常提交时间)

异常信息数量:3192个


数据库收集到的异常信息:

技术分享

异常信息统计sql:

SELECT
(SELECT count(Id) From t_apperror WHERE Context LIKE '%Exception:CannotperformthisactionafteronSaveInstanceState%')
/
(SELECT count(ID) From t_apperror) as 'Framage隐藏失败' /** 0.0047 **/

SELECT
(SELECT count(Id) From t_apperror WHERE Context LIKE '%Exception:syntaxerror%')
/
(SELECT count(ID) From t_apperror) as 'syntaxerror' /** 0.0119 **/

SELECT
(SELECT count(Id) From t_apperror WHERE Context LIKE '%Stringcannotbecastto%')
/
(SELECT count(ID) From t_apperror) as 'string转型错误(大多数转向json)' /** 0.0103 **/

SELECT
(SELECT count(Id) From t_apperror WHERE Context LIKE 'Exception:Invalidint%')
/
(SELECT count(ID) From t_apperror) as 'json解析错误' /** 0.0229 **/

SELECT
(SELECT count(Id) From t_apperror WHERE Context LIKE '%Exception:null_%')
/
(SELECT count(ID) From t_apperror) 
 + (SELECT count(Id) From t_apperror WHERE Context LIKE '%Exception:java.lang.NullPointer%')
/
(SELECT count(ID) From t_apperror) 
as "空指针" /** 0.3932 **/

SELECT
(SELECT count(ID) From t_apperror WHERE Context LIKE 'Exception:Fragmentalreadyadded%')
/
(SELECT count(ID) From t_apperror) as 'Exception:Fragmentalreadyadded'  /** 0.0063 **/

SELECT
(SELECT count(ID) From t_apperror WHERE Context LIKE 'Exception:Unabletoaddwindow%')
/
(SELECT count(ID) From t_apperror)
as 'Exception:Unabletoaddwindow' /** 0.1263 **/

SELECT
(SELECT count(ID) From t_apperror WHERE Context LIKE 'Exception:Unabletodestroyactivity%')
/
(SELECT count(ID) From t_apperror) as 'Unabletodestroyactivity'  /** 0.0276 **/

SELECT
(SELECT count(ID) From t_apperror WHERE Context LIKE 'Exception:BinaryXMLfile%')
/
(SELECT count(ID) From t_apperror) as 'xml布局错误' /** 0.0053 **/

SELECT
(SELECT count(ID) From t_apperror WHERE Context LIKE 'Exception:Invalidindex%')
/
(SELECT count(ID) From t_apperror) as "超出索引" /** 0.0103 **/

统计结果:

技术分享

统计结论:

1.空指针错误是最常见的。

2.编译器会犯傻,binaryxml和syntaxerror错误都会出现。

3.编码上 fragment错误比较多,可能是编码人员对 fragment不够了解构成的。





以上统计不太全面,仅供参考。


一个有趣的安卓软件异常统计

标签:android   软件开发   

原文地址:http://blog.csdn.net/u010499721/article/details/42572775

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!