react-native/React/Profiler/RCTJSCProfiler.h
Milen Dzhumerov 0fe50055c4 Introduce JSC profiler API
Summary:
Extract JSC profiler API which can now be used even if profiler is unavailable.

public

Reviewed By: tadeuzagallo

Differential Revision: D2749217

fb-gh-sync-id: 1ffa6f37323ea0ddbda3fdacfdf8a9b360185b2e
2015-12-15 03:12:32 -08:00

23 lines
731 B
Objective-C

/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <JavaScriptCore/JavaScriptCore.h>
#import "RCTDefines.h"
/** The API is not thread-safe. */
/** The context is not retained. */
RCT_EXTERN void RCTJSCProfilerStart(JSContextRef ctx);
/** Returns a file path containing the profiler data. */
RCT_EXTERN NSString *RCTJSCProfilerStop(JSContextRef ctx);
RCT_EXTERN BOOL RCTJSCProfilerIsProfiling(JSContextRef ctx);
RCT_EXTERN BOOL RCTJSCProfilerIsSupported(void);