From 89139bba30f7c742c61e6387a109893a7ad76931 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 12 Feb 2021 16:08:28 +0100 Subject: [PATCH] expose some meta data on a log export to show before submitting --- src/logging/IDBLogger.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/logging/IDBLogger.js b/src/logging/IDBLogger.js index 4ea746ac..155d186a 100644 --- a/src/logging/IDBLogger.js +++ b/src/logging/IDBLogger.js @@ -163,6 +163,24 @@ class IDBLogExport { this._platform = platform; } + get minTimestamp() { + if (!this._items.length) { + return 0; + } + return this._items[0].start; + } + + get maxTimestamp() { + if (!this._items.length) { + return 0; + } + return this._items[this._items.length - 1].end; + } + + get count() { + return this._items.length; + } + /** * @return {Promise} */