<commit_before>var http_server = function () {

	var _this = this;
	var http = require("http"); //http服务器
	var cluster = require('cluster');
	var url = require("url");
	var numCPUs = require('os').cpus().length;
	var route = require("./router").route;
	var cfg = require("./config");
	var config = cfg.config;
	var handle = cfg.router;
	/*
	 *	启动HTTP服务器 并且运行框架
	 */
	this.start = function () {
		var listen = config.server.port;
		if (cluster.isMaster) {
			for (var i = 0; i < numCPUs; i++) {
				cluster.fork();
			}

			cluster.on('exit', function (worker, code, signal) {
				console.log('error: ' + worker.process.pid + ' died');
			});
		}
		else {
			http.createServer(_this.on).listen(listen, function () {
				console.log("success:在" + listen + "上跑起来了");
			});
		}
	};

	this.on = function (req, res) {
		var pathname = url.parse(req.url).pathname;
		route(handle, pathname, res, req);
	};
}

module.exports = http_server;<commit_msg>去除多核利用代码<commit_after>var http_server = function () {

	var _this = this;
	var http = require("http"); //http服务器
	//var cluster = require('cluster');
	var url = require("url");
	//var numCPUs = require('os').cpus().length;
	var route = require("./router").route;
	var cfg = require("./config");
	var config = cfg.config;
	var handle = cfg.router;
	/*
	 *	启动HTTP服务器 并且运行框架
	 */
	this.start = function () {
		var listen = config.server.port;
		/*if (cluster.isMaster) {
		 for (var i = 0; i < numCPUs; i++) {
		 cluster.fork();
		 }

		 cluster.on('exit', function (worker, code, signal) {
		 console.log('error: ' + worker.process.pid + ' died');
		 });
		 }
		 else {*/
		http.createServer(_this.on).listen(listen, function () {
			console.log("success:在" + listen + "上跑起来了");
		});
		//}
	};

	this.on = function (req, res) {
		var pathname = url.parse(req.url).pathname;
		route(handle, pathname, res, req);
	};
}

module.exports = http_server;
{'fraction_non_alphanumeric': 0.18941798941798943, 'fraction_numerical': 0.0010582010582010583, 'mean_word_length': 3.317351598173516, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1014099', 'n_tokens_mistral': 758, 'n_tokens_neox': 698, 'n_words': 149}