Systrace stub fixes

Differential Revision: D2516670

fb-gh-sync-id: 89d7fdce569d4b37633fb4ab4acbeef707d54bac
This commit is contained in:
Mike Armstrong 2015-10-06 23:45:06 -07:00 committed by facebook-github-bot-7
parent 9dfd487810
commit 8251f1c905
2 changed files with 53 additions and 0 deletions

View File

@ -15,6 +15,39 @@ package com.facebook.systrace;
public class Systrace {
public static final long TRACE_TAG_REACT_JAVA_BRIDGE = 0L;
public static final long TRACE_TAG_REACT_FRESCO = 0L;
public enum EventScope {
THREAD('t'),
PROCESS('p'),
GLOBAL('g');
private final char mCode;
private EventScope(char code) {
mCode = code;
}
public char getCode() {
return mCode;
}
}
public static void registerListener(TraceListener listener) {
}
public static void unregisterListener(TraceListener listener) {
}
public static boolean isTracing(long tag) {
return false;
}
public static void traceInstant(
long tag,
final String title,
EventScope scope) {
}
public static void beginSection(long tag, final String sectionName) {
}
@ -22,6 +55,18 @@ public class Systrace {
public static void endSection(long tag) {
}
public static void beginAsyncSection(
long tag,
final String sectionName,
final int cookie) {
}
public static void endAsyncSection(
long tag,
final String sectionName,
final int cookie) {
}
public static void traceCounter(
long tag,
final String counterName,

View File

@ -0,0 +1,8 @@
// Copyright 2004-present Facebook. All Rights Reserved.
package com.facebook.systrace;
public interface TraceListener {
void onTraceStarted();
void onTraceStopped();
}