File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
backtrace-library/src/main/java/backtraceio/library Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ public void start() {
258258 return ;
259259 }
260260
261- this .loadReports (); // load reports from internal storage
261+ this .loadReports ();
262262
263263 this .removeOrphaned ();
264264
@@ -437,6 +437,17 @@ public int count() {
437437 }
438438
439439 private void loadReports () {
440+ final long startLoadingReportsTime = System .currentTimeMillis ();
441+
442+ this .loadReportsToDbContext ();
443+
444+ final long endLoadingReportsTime = System .currentTimeMillis ();
445+
446+ BacktraceLogger .d (LOG_TAG , "Loading " + backtraceDatabaseContext .count () +
447+ " reports took " + (endLoadingReportsTime - startLoadingReportsTime ) + " milliseconds" );
448+ }
449+
450+ private void loadReportsToDbContext () {
440451 Iterable <File > files = backtraceDatabaseFileContext .getRecords ();
441452
442453 for (File file : files ) {
@@ -453,6 +464,7 @@ private void loadReports() {
453464 validateDatabaseSize ();
454465 record .close ();
455466 }
467+
456468 }
457469
458470 /**
You can’t perform that action at this time.
0 commit comments