use of com.newrelic.agent.profile.StartProfilerCommand in project newrelic-java-agent by newrelic.
the class CommandParserThreadProfilerTest method processThreadProfilerCommand.
private Map<Long, Object> processThreadProfilerCommand(String threadProfilerGetCommand) throws Exception {
JSONParser parser = new JSONParser();
Object parsedTPAgentCommand = parser.parse(threadProfilerGetCommand);
Map<?, ?> tpAgentCommandMap = Map.class.cast(parsedTPAgentCommand);
List<List<?>> threadProfilerCommands = (List<List<?>>) tpAgentCommandMap.get("return_value");
commandParser.addCommands(new StartProfilerCommand(profilerService));
MockRPMService rpmService = new MockRPMService();
Map<Long, Object> result = commandParser.processCommands(rpmService, threadProfilerCommands);
return result;
}
Aggregations