public AsyncProfilerTaskCommand newAsyncProfileTaskCommand(AsyncProfilerTask task) {
        final String serialNumber = UUID.randomUUID().toString();
        List<String> eventNames = task.getEvents().stream()
                .map(AsyncProfilerEventType::getName)
                .collect(Collectors.toList());
        return new AsyncProfilerTaskCommand(serialNumber, task.getId(), task.getDuration(),
                eventNames, task.getExecArgs(), task.getCreateTime());
    }
CommandService represents the command creation factory. All commands for downstream agents should be created here.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/command/CommandService.java