inspector/src/main/java/com/taobao/weex/devtools/inspector/protocol/module/Profiler.java
/*
* Copyright (c) 2014-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.taobao.weex.devtools.inspector.protocol.module;
import com.taobao.weex.devtools.inspector.jsonrpc.JsonRpcPeer;
import com.taobao.weex.devtools.inspector.jsonrpc.JsonRpcResult;
import com.taobao.weex.devtools.inspector.protocol.ChromeDevtoolsDomain;
import com.taobao.weex.devtools.inspector.protocol.ChromeDevtoolsMethod;
import com.taobao.weex.devtools.json.annotation.JsonProperty;
import org.json.JSONObject;
import java.util.Collections;
import java.util.List;
public class Profiler implements ChromeDevtoolsDomain {
public Profiler() {
}
@ChromeDevtoolsMethod
public void enable(JsonRpcPeer peer, JSONObject params) {
}
@ChromeDevtoolsMethod
public void disable(JsonRpcPeer peer, JSONObject params) {
}
@ChromeDevtoolsMethod
public void setSamplingInterval(JsonRpcPeer peer, JSONObject params) {
}
@ChromeDevtoolsMethod
public JsonRpcResult getProfileHeaders(JsonRpcPeer peer, JSONObject params) {
ProfileHeaderResponse response = new ProfileHeaderResponse();
response.headers = Collections.emptyList();
return response;
}
private static class ProfileHeaderResponse implements JsonRpcResult {
@JsonProperty(required = true)
public List<ProfileHeader> headers;
}
private static class ProfileHeader {
@JsonProperty(required = true)
String typeId;
@JsonProperty(required = true)
String title;
@JsonProperty(required = true)
int uid;
}
}