private String checkDataSuccess(final String serviceId,
                                    final String endpointName,
                                    final long monitorStartTime,
                                    final long monitorEndTime,
                                    final int monitorDuration,
                                    final int minDurationThreshold,
                                    final int dumpPeriod,
                                    final int maxSamplingCount) throws IOException {
        // basic check
        if (serviceId == null) {
            return "service cannot be null";
        }
        if (StringUtil.isEmpty(endpointName)) {
            return "endpoint name cannot be empty";
        }
        if (monitorDuration < ProfileConstants.TASK_DURATION_MIN_MINUTE) {
            return "monitor duration must greater than " + ProfileConstants.TASK_DURATION_MIN_MINUTE + " minutes";
        }
        if (minDurationThreshold < 0) {
            return "min duration threshold must greater than or equals zero";
        }
        if (maxSamplingCount <= 0) {
            return "max sampling count must greater than zero";
        }

        // check limit
        if (monitorDuration > ProfileConstants.TASK_DURATION_MAX_MINUTE) {
            return "The duration of the monitoring task cannot be greater than " + ProfileConstants.TASK_DURATION_MAX_MINUTE + " minutes";
        }

        if (dumpPeriod < ProfileConstants.TASK_DUMP_PERIOD_MIN_MILLIS) {
            return "dump period must be greater than or equals " + ProfileConstants.TASK_DUMP_PERIOD_MIN_MILLIS + " milliseconds";
        }

        if (maxSamplingCount >= ProfileConstants.TASK_MAX_SAMPLING_COUNT) {
            return "max sampling count must less than " + ProfileConstants.TASK_MAX_SAMPLING_COUNT;
        }

        // Each service can monitor up to 1 endpoints during the execution of tasks
        long endTimeBucket = TimeBucket.getMinuteTimeBucket(monitorEndTime);
        final List<ProfileTask> alreadyHaveTaskList = getProfileTaskDAO().getTaskList(
            serviceId, null, null, endTimeBucket, 1);
        if (CollectionUtils.isNotEmpty(alreadyHaveTaskList)) {
            for (ProfileTask profileTask : alreadyHaveTaskList) {
                if (profileTask.getStartTime() + TimeUnit.MINUTES.toMillis(profileTask.getDuration()) >= monitorStartTime) {
                    // if the endTime is greater or equal than the startTime of the newly created task, i.e. there is overlap between two tasks, it is an invalid case
                    return "current service already has monitor task execute at this time";
                }
            }
        }
        return null;
    }
create new profile task

@param serviceId            monitor service id
@param endpointName         monitor endpoint name
@param monitorStartTime     create fix start time task when it's bigger 0
@param monitorDuration      monitor task duration(minute)
@param minDurationThreshold min duration threshold
@param dumpPeriod           dump period
@param maxSamplingCount     max trace count on sniffer
@return task create result
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/trace/ProfileTaskMutationService.java