<commit_before>package com.ikasoa.springboot;

import java.util.Optional;

import javax.annotation.PreDestroy;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;

import com.ikasoa.rpc.IkasoaException;
import com.ikasoa.rpc.IkasoaServer;

/**
 * IKASOA服务Runner类
 * 
 * @author <a href="mailto:<EMAIL>">Larry</a>
 * @version 0.1
 */
public abstract class IkasoaServerRunner implements CommandLineRunner {

	private static final Logger LOG = LoggerFactory.getLogger(IkasoaServerRunner.class);

	/**
	 * 启动服务等待时间(毫秒)
	 */
	private final static int WAIT_TIME = 500;

	@Autowired
	protected IkasoaServer server;

	protected abstract void complete(String... args) throws IkasoaException;

	protected abstract void fail(String... args) throws IkasoaException;

	@Override
	public void run(String... args) throws IkasoaException, InterruptedException {
		if (server == null)
			throw new IkasoaException("Ikasoa server initialize failed !");
		server.run();
		Thread.sleep(WAIT_TIME);
		if (server.isServing()) {
			LOG.info("Ikasoa server startup success . ({})", server.getServerName());
			complete(args);
		} else {
			LOG.warn("Ikasoa server startup failed ! ({})", server.getServerName());
			fail(args);
		}
	}

	@PreDestroy
	public void destory() {
		Optional.ofNullable(server).ifPresent(s -> s.stop());
	}

}
<commit_msg>adjusting the runserver wait time.<commit_after>package com.ikasoa.springboot;

import java.util.Optional;

import javax.annotation.PreDestroy;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;

import com.ikasoa.rpc.IkasoaException;
import com.ikasoa.rpc.IkasoaServer;

/**
 * IKASOA服务Runner类
 * 
 * @author <a href="mailto:<EMAIL>">Larry</a>
 * @version 0.1
 */
public abstract class IkasoaServerRunner implements CommandLineRunner {

	private static final Logger LOG = LoggerFactory.getLogger(IkasoaServerRunner.class);

	/**
	 * 启动服务等待时间(毫秒)
	 */
	private final static int WAIT_TIME = 1000;

	@Autowired
	protected IkasoaServer server;

	protected abstract void complete(String... args) throws IkasoaException;

	protected abstract void fail(String... args) throws IkasoaException;

	@Override
	public void run(String... args) throws IkasoaException, InterruptedException {
		if (server == null)
			throw new IkasoaException("Ikasoa server initialize failed !");
		server.run();
		Thread.sleep(WAIT_TIME);
		if (server.isServing()) {
			LOG.info("Ikasoa server startup success . ({})", server.getServerName());
			complete(args);
		} else {
			LOG.warn("Ikasoa server startup failed ! ({})", server.getServerName());
			fail(args);
		}
	}

	@PreDestroy
	public void destory() {
		Optional.ofNullable(server).ifPresent(s -> s.stop());
	}

}

{'fraction_non_alphanumeric': 0.12405498281786942, 'fraction_numerical': 0.005154639175257732, 'mean_word_length': 4.822, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3877004', 'n_tokens_mistral': 1016, 'n_tokens_neox': 942, 'n_words': 206}