stub Java QPL for OSS
Reviewed By: @mkonicek Differential Revision: D2470258
This commit is contained in:
parent
393b6791a8
commit
da284f6e36
|
@ -0,0 +1,93 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.quicklog;
|
||||
|
||||
/**
|
||||
* Stub implementation of QPL
|
||||
*/
|
||||
public class QuickPerformanceLogger {
|
||||
|
||||
public void markerStart(
|
||||
int markerId) {
|
||||
}
|
||||
|
||||
public void markerStart(
|
||||
int markerId,
|
||||
int instnaceKey) {
|
||||
}
|
||||
|
||||
public void markerStart(
|
||||
int markerId,
|
||||
int instnaceKey,
|
||||
long timestamp) {
|
||||
}
|
||||
|
||||
public void markerEnd(
|
||||
int markerId,
|
||||
short actionId) {
|
||||
}
|
||||
|
||||
public void markerEnd(
|
||||
int markerId,
|
||||
int instanceKey,
|
||||
short actionId) {
|
||||
}
|
||||
|
||||
public void markerEnd(
|
||||
int markerId,
|
||||
int instanceKey,
|
||||
short actionId,
|
||||
long timestamp) {
|
||||
}
|
||||
|
||||
public void markerNote(
|
||||
int markerId,
|
||||
short actionId) {
|
||||
}
|
||||
|
||||
public void markerNote(
|
||||
int markerId,
|
||||
int instanceKey,
|
||||
short actionId) {
|
||||
}
|
||||
|
||||
public void markerNote(
|
||||
int markerId,
|
||||
int instanceKey,
|
||||
short actionId,
|
||||
long timestamp) {
|
||||
}
|
||||
|
||||
public void markerCancel(
|
||||
int markerId) {
|
||||
}
|
||||
|
||||
public void markerCancel(
|
||||
int markerId,
|
||||
int instanceKey) {
|
||||
}
|
||||
|
||||
public void markerTag(
|
||||
int markerId,
|
||||
String tag) {
|
||||
}
|
||||
|
||||
public void markerTag(
|
||||
int markerId,
|
||||
int instanceKey,
|
||||
String tag) {
|
||||
}
|
||||
|
||||
public long currentMonotonicTimestamp() {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.quicklog;
|
||||
|
||||
/**
|
||||
* Provides stub implementation of QPL
|
||||
*/
|
||||
public class QuickPerformanceLoggerProvider {
|
||||
|
||||
private static final QuickPerformanceLogger sQuickPerformanceLogger =
|
||||
new QuickPerformanceLogger();
|
||||
|
||||
public static QuickPerformanceLogger getQPLInstance() {
|
||||
return sQuickPerformanceLogger;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.quicklog.identifiers;
|
||||
|
||||
/**
|
||||
* Stub implementation of Action Identifiers.
|
||||
* Use your own implementation with you own implementation of QuickPerformanceLogger
|
||||
*/
|
||||
public class ActionId {
|
||||
|
||||
/** Don't use this action identifier */
|
||||
public static short UNDEFINED = 0;
|
||||
|
||||
/** This starts all markers */
|
||||
public static short START = 0;
|
||||
|
||||
/** Successful termination of the marker */
|
||||
public static short SUCCESS = 0;
|
||||
|
||||
/** Termination of marker due to some failure */
|
||||
public static short FAIL = 0;
|
||||
|
||||
/** Termination of marker due to a cancellation */
|
||||
public static short CANCEL = 0;
|
||||
|
||||
/** Some (general) drawing action has completed */
|
||||
public static short DRAW_COMPLETE = 0;
|
||||
|
||||
/** General pause poshort */
|
||||
public static short PAUSE = 0;
|
||||
|
||||
/** General resume poshort */
|
||||
public static short RESUME = 0;
|
||||
|
||||
/** Insertion into a queue */
|
||||
public static short QUEUED = 0;
|
||||
|
||||
/** Some error occurred */
|
||||
public static short ERROR = 0;
|
||||
|
||||
/** Denoting a finally situation */
|
||||
public static short FINALLY = 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.quicklog.identifiers;
|
||||
|
||||
/**
|
||||
* Stub definition of identifier needed in react native open source code.
|
||||
* Use your own identifiers with your own QuickPerformanceLogger implementation
|
||||
*/
|
||||
public class ReactNativeBridge {
|
||||
|
||||
public static final int CALL_JAVA_MODULE_METHOD = 0;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue