Skip to content

Commit

Permalink
Systrace stub fixes
Browse files Browse the repository at this point in the history
Differential Revision: D2516670

fb-gh-sync-id: 89d7fdce569d4b37633fb4ab4acbeef707d54bac
  • Loading branch information
mikearmstrong001 authored and facebook-github-bot-7 committed Oct 7, 2015
1 parent 9dfd487 commit 8251f1c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
45 changes: 45 additions & 0 deletions ReactAndroid/src/main/java/com/facebook/systrace/Systrace.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,58 @@
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) {
}

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,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2004-present Facebook. All Rights Reserved.

package com.facebook.systrace;

public interface TraceListener {
void onTraceStarted();
void onTraceStopped();
}

0 comments on commit 8251f1c

Please sign in to comment.