Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5508c034 authored by Ioana Alexandru's avatar Ioana Alexandru Committed by Android (Google) Code Review
Browse files

Merge "Dump values in NotifCollectionCache, not just keys" into main

parents 56e687b6 be6c6b4b
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -102,6 +102,10 @@ class NotifCollectionCache<V>(
                return --lives <= 0
            }
        }

        override fun toString(): String {
            return "$key = $value"
        }
    }

    /**
@@ -174,7 +178,10 @@ class NotifCollectionCache<V>(

        pw.println("$TAG(retainCount = $retainCount, purgeTimeoutMillis = $purgeTimeoutMillis)")
        pw.withIncreasedIndent {
            pw.printCollection("keys present in cache", cache.keys.stream().sorted().toList())
            pw.printCollection(
                "entries present in cache",
                cache.values.stream().map { it.toString() }.sorted().toList(),
            )

            val misses = misses.get()
            val hits = hits.get()