-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup and enrich collected metrics
- Loading branch information
Showing
14 changed files
with
107 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
platform/jvm/replay/src/main/kotlin/io/bitdrift/capture/replay/ScreenshotCaptureMetrics.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package io.bitdrift.capture.replay | ||
|
||
data class ScreenshotCaptureMetrics( | ||
val screenshotTimeMs: Long, | ||
val screenshotAllocationByteCount: Int, | ||
val screenshotByteCount: Int, | ||
var compressionTimeMs: Long = 0, | ||
var compressionByteCount: Int = 0, | ||
) { | ||
val totalDurationMs: Long | ||
get() = screenshotTimeMs + compressionTimeMs | ||
|
||
fun toMap(): Map<String, String> { | ||
return mapOf( | ||
"screenshot_time_ms" to screenshotTimeMs.toString(), | ||
"screenshot_allocation_byte_count" to screenshotAllocationByteCount.toString(), | ||
"screenshot_byte_count" to screenshotByteCount.toString(), | ||
"compression_time_ms" to compressionTimeMs.toString(), | ||
"compression_byte_count" to compressionByteCount.toString(), | ||
"total_duration_ms" to totalDurationMs.toString(), | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.