Skip to content

RUMM-2746 Sync SR touch and screen recorders#1150

Merged
mariusc83 merged 1 commit into
feature/sdkv2from
mconstantin/rumm-2746/sync-sr-touch-and-screen-recorders
Nov 21, 2022
Merged

RUMM-2746 Sync SR touch and screen recorders#1150
mariusc83 merged 1 commit into
feature/sdkv2from
mconstantin/rumm-2746/sync-sr-touch-and-screen-recorders

Conversation

@mariusc83

Copy link
Copy Markdown
Member

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@mariusc83 mariusc83 self-assigned this Nov 18, 2022
@xgouchet xgouchet added the size-small This PR is small sized label Nov 18, 2022
@codecov-commenter

codecov-commenter commented Nov 18, 2022

Copy link
Copy Markdown

Codecov Report

Merging #1150 (8dc66df) into feature/sdkv2 (07c6fe9) will increase coverage by 0.13%.
The diff coverage is 94.44%.

@@                Coverage Diff                @@
##           feature/sdkv2    #1150      +/-   ##
=================================================
+ Coverage          82.38%   82.50%   +0.13%     
=================================================
  Files                350      351       +1     
  Lines              11559    11573      +14     
  Branches            1980     1983       +3     
=================================================
+ Hits                9522     9548      +26     
+ Misses              1423     1422       -1     
+ Partials             614      603      -11     
Impacted Files Coverage Δ
...atadog/android/sessionreplay/recorder/Debouncer.kt 92.86% <92.86%> (ø)
...d/sessionreplay/recorder/RecorderOnDrawListener.kt 86.96% <100.00%> (ø)
...android/v2/core/internal/DatadogContextProvider.kt 81.54% <0.00%> (ø)
.../android/rum/internal/domain/scope/RumViewScope.kt 96.56% <0.00%> (+0.19%) ⬆️
...android/rum/internal/ndk/DatadogNdkCrashHandler.kt 87.82% <0.00%> (+0.51%) ⬆️
...android/log/internal/domain/DatadogLogGenerator.kt 96.43% <0.00%> (+0.89%) ⬆️
.../kotlin/com/datadog/android/v2/core/DatadogCore.kt 89.95% <0.00%> (+1.37%) ⬆️
...ndroid/telemetry/internal/TelemetryEventHandler.kt 72.50% <0.00%> (+3.33%) ⬆️
...in/com/datadog/android/log/internal/LogsFeature.kt 91.94% <0.00%> (+4.84%) ⬆️

@mariusc83
mariusc83 marked this pull request as ready for review November 18, 2022 16:10
@mariusc83
mariusc83 requested a review from a team as a code owner November 18, 2022 16:10
) : ViewTreeObserver.OnDrawListener {
private var currentOrientation = Configuration.ORIENTATION_UNDEFINED
private val trackedActivity: WeakReference<Activity> = WeakReference(activity)
private var lastScreenUpdateInNs = System.nanoTime()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like this field is not used: it is written, but never read.

forge: Forge
) {
// Given
val fakeDelayedRunnables = forge.aList(size = forge.anInt(min = 0, max = 10)) { TestRunnable() }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having min=0 will make it possible to have empty fakeDelayedRunnables list, leading to the division by zero on the line below. Same for the test below.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh damn...yes, I actually had min=1 there at some point I don't know why I changed it back. Nicely spotted.

@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2746/sync-sr-touch-and-screen-recorders branch 2 times, most recently from df93304 to 3bb3bbd Compare November 21, 2022 09:48
}

companion object {
private val TEST_MAX_DELAY_THRESHOLD_IN_NS = TimeUnit.SECONDS.toNanos(2)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: this probably can be even lower to make tests faster

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup...I hesitated as not to have longer tests, we already have quite a lot but I guess is better than to have flaky ones.

@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2746/sync-sr-touch-and-screen-recorders branch from 3bb3bbd to 7980e9d Compare November 21, 2022 10:44
@mariusc83
mariusc83 force-pushed the mconstantin/rumm-2746/sync-sr-touch-and-screen-recorders branch from 7980e9d to c23b880 Compare November 21, 2022 10:52
@mariusc83
mariusc83 merged commit ca19f1d into feature/sdkv2 Nov 21, 2022
@mariusc83
mariusc83 deleted the mconstantin/rumm-2746/sync-sr-touch-and-screen-recorders branch November 21, 2022 12:24
@xgouchet xgouchet added this to the 1.16.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size-small This PR is small sized

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants