Skip to content

Commit

Permalink
Merge pull request #9 from NimbleDroid/1.2.0
Browse files Browse the repository at this point in the history
Support custom TimeInterval bookends
  • Loading branch information
checkthebounds authored Mar 20, 2021
2 parents aef2979 + 243b98b commit 75f716f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
3 changes: 1 addition & 2 deletions NimbleDroid.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NimbleDroid'
s.version = '1.1.0'
s.version = '1.2.0'
s.summary = 'Functional performance testing using NimbleDroid'
s.homepage = 'https://github.com/NimbleDroid/NimbleDroid-iOS'
s.license = 'None'
Expand All @@ -18,5 +18,4 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.swift_version = '4.0'
s.source_files = 'NimbleDroid/*.{h,swift}'
s.social_media_url = 'https://twitter.com/NimbleDroid'
end
1 change: 1 addition & 0 deletions NimbleDroid.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = E23F937E1EC12F3000296150;
Expand Down
2 changes: 1 addition & 1 deletion NimbleDroid/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.1.0</string>
<string>1.2.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
16 changes: 12 additions & 4 deletions NimbleDroid/NimbleDroid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,36 @@ public class NDScenario : NSObject {
NSLog("NDScenario is not initialized, please call setup in application:willFinishLaunchingWithOptions:")
}

@objc public class func begin(bookendID : String) {
@objc public class func begin(bookendID : String, timeInterval : TimeInterval) {
if !initialized {
warnSetup()
}
NSLog("NDScenario.begin %@ %f", bookendID, NSDate.init().timeIntervalSince1970 * 1000000)
NSLog("NDScenario.begin %@ %f", bookendID, timeInterval * 1000000)
fflush(stderr)
if bookendID == scenario {
raise(SIGSTOP)
}
}

@objc public class func end(bookendID : String) {
@objc public class func begin(bookendID : String) {
begin(bookendID: bookendID, timeInterval: NSDate.init().timeIntervalSince1970)
}

@objc public class func end(bookendID : String, timeInterval : TimeInterval) {
if !initialized {
warnSetup()
}
NSLog("NDScenario.end %@ %f", bookendID, NSDate.init().timeIntervalSince1970 * 1000000)
NSLog("NDScenario.end %@ %f", bookendID, timeInterval * 1000000)
fflush(stderr)
if bookendID == scenario {
raise(SIGSTOP)
}
}

@objc public class func end(bookendID : String) {
end(bookendID: bookendID, timeInterval: NSDate.init().timeIntervalSince1970)
}

@objc public class func coldStartupEnd() {
if !initialized {
warnSetup()
Expand Down

0 comments on commit 75f716f

Please sign in to comment.