- } catch (RuntimeException r) {\r
- //TODO count ; any type of exception should be treated, and the progress indicator finished;\r
- // reporting the user about bad synchronizations should be discussed\r
- r.printStackTrace();\r
- throw r;\r
+ } catch (Throwable t) {\r
+ // TODO update syncResult\r
+ Log.e(TAG, "problem while synchronizing owncloud account " + account.name, t);\r
+ t.printStackTrace();\r
+ }\r
+ \r
+ /* Commented code for ugly performance tests\r
+ long sum = 0, mean = 0, max = 0, min = Long.MAX_VALUE;\r
+ for (int i=0; i<MAX_DELAYS && i<mDelaysCount; i++) {\r
+ sum += mResponseDelays[i];\r
+ max = Math.max(max, mResponseDelays[i]);\r
+ min = Math.min(min, mResponseDelays[i]);\r
+ }\r
+ mean = sum / mDelaysCount;\r
+ Log.e(TAG, "SYNC STATS - response: mean time = " + mean + " ; max time = " + max + " ; min time = " + min);\r
+ \r
+ sum = 0; max = 0; min = Long.MAX_VALUE;\r
+ for (int i=0; i<MAX_DELAYS && i<mDelaysCount; i++) {\r
+ sum += mSaveDelays[i];\r
+ max = Math.max(max, mSaveDelays[i]);\r
+ min = Math.min(min, mSaveDelays[i]);\r