use of com.navercorp.pinpoint.profiler.metadata.ApiMetaData in project pinpoint by naver.
the class TestTcpDataSender method addData.
private void addData(MetaDataType data) {
if (data instanceof ApiMetaData) {
ApiMetaData md = (ApiMetaData) data;
int apiId = md.getApiId();
String javaMethodDescriptor = toJavaMethodDescriptor(md);
syncPut(this.apiIdMap, apiId, javaMethodDescriptor);
} else if (data instanceof SqlMetaData) {
SqlMetaData md = (SqlMetaData) data;
int id = md.getSqlId();
String sql = md.getSql();
syncPut(sqlIdMap, id, sql);
} else if (data instanceof StringMetaData) {
StringMetaData md = (StringMetaData) data;
int id = md.getStringId();
String string = md.getStringValue();
syncPut(stringIdMap, id, string);
}
datas.add(data);
}
use of com.navercorp.pinpoint.profiler.metadata.ApiMetaData in project pinpoint by naver.
the class MockApiMetaDataService method cacheApi.
@Override
public int cacheApi(final MethodDescriptor methodDescriptor) {
final String fullName = methodDescriptor.getFullName();
final Result result = this.apiCache.put(fullName);
methodDescriptor.setApiId(result.getId());
final ApiMetaData apiMetadata = new ApiMetaData(result.getId(), methodDescriptor.getApiDescriptor(), methodDescriptor.getLineNumber(), methodDescriptor.getType());
this.enhancedDataSender.request(apiMetadata);
return result.getId();
}
Aggregations