Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Maciek Grzybowski <maciek.grzybowski@datadoghq.com>
  • Loading branch information
maxep and ncreated committed Oct 24, 2022
1 parent fbc11e4 commit f4d4fef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
buildConfiguration = "Integration"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableThreadSanitizer = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
4 changes: 2 additions & 2 deletions Sources/Datadog/RUM/RUMMonitor/Scopes/RUMViewScope.swift
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,11 @@ internal class RUMViewScope: RUMScope, RUMContextProvider {
} else if let launchDate = context.launchTime.launchDate {
// The launchTime can be `nil` if the application is not yet
// active (UIApplicationDidBecomeActiveNotification). That is
// the case when instrumenting a SwiftUI application that start
// the case when instrumenting a SwiftUI application that starts
// a RUM view on `SwiftUI.View.onAppear`.
//
// In that case, we consider the time between the application
// launch and the view start as the application loadint time.
// launch and the view start as the application loading time.
loadingTime = viewStartTime.timeIntervalSince(launchDate).toInt64Nanoseconds
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/_Datadog_Private/ObjcAppLaunchHandler.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

/// Get the process start time from kernel.
///
/// The time intervale is related to the 1 January 2001 00:00:00 GMT reference date.
/// The time interval is related to the 1 January 2001 00:00:00 GMT reference date.
///
/// - Parameter timeInterval: Pointer to time interval to hold the process start time interval.
int processStartTimeIntervalSinceReferenceDate(NSTimeInterval *timeInterval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,7 @@ class RUMViewScopeTests: XCTestCase {
// Given
let currentTime: Date = .mockDecember15th2019At10AMUTC()
let source = String.mockAnySource()
let custonContext: DatadogContext = .mockWith(source: source)

var context = self.context
context.launchTime = .init(
launchTime: 2,
launchDate: nil,
isActivePrewarm: false
)
let customContext: DatadogContext = .mockWith(source: source)

let scope = RUMViewScope(
isInitialView: true,
Expand All @@ -159,7 +152,7 @@ class RUMViewScopeTests: XCTestCase {
// When
_ = scope.process(
command: RUMCommandMock(time: currentTime),
context: custonContext,
context: customContext,
writer: writer
)

Expand Down

0 comments on commit f4d4fef

Please sign in to comment.