-
Notifications
You must be signed in to change notification settings - Fork 436
/
FBInstrumentsClient.h
53 lines (38 loc) · 1.32 KB
/
FBInstrumentsClient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Foundation/Foundation.h>
#import <FBControlCore/FBControlCore.h>
NS_ASSUME_NONNULL_BEGIN
@class FBAMDServiceConnection;
@class FBApplicationLaunchConfiguration;
/**
A client for Instruments.
*/
@interface FBInstrumentsClient : NSObject
#pragma mark Initializers
/**
Constructs a transport for the specified service connection.
@param connection the connection to use.
@param logger the logger to use.
@return a Future that resolves with the instruments client.
*/
+ (FBFuture<FBInstrumentsClient *> *)instrumentsClientWithServiceConnection:(FBAMDServiceConnection *)connection logger:(id<FBControlCoreLogger>)logger;
#pragma mark Public Methods
/**
Launches an application.
@param configuration the app launch configuration.
@return a Future that resolves with the pid of the app once it has launched.
*/
- (FBFuture<NSNumber *> *)launchApplication:(FBApplicationLaunchConfiguration *)configuration;
/**
Kills an application
@param processIdentifier the pid of the process to kill.
@return a Future that resolves when killed.
*/
- (FBFuture<NSNull *> *)killProcess:(pid_t)processIdentifier;
@end
NS_ASSUME_NONNULL_END