<commit_before>if (typeof NCI === 'undefined')
   NCI = {};
   
NCI.start_time; // no data exists on the server before
NCI.time_adjustment = 0; //difference between client and server time in milliseconds
   
NCI.Connection = new WebSocket("ws://" + 'nci.ilabs.inca.infoblox.com:28080' + "/clientsock.yaws");
NCI.Connection.onopen = function () {
	console.log('opened');
	NCI.Connection.send('START_DATA');
};

NCI.Connection.onmessage  = function (e) {
	var data = eval("tmp = " + e.data );
	if (data.start_time){
	    NCI.time_adjustment = new Date() - new Date(data.current_time);
		return;
	};
	
	if (NCI.slider[0].value == 0){
		console.log(data);
		var params = {};
		params.time = new Date(data.Time).getMinutes() + ":" + new Date(data.Time).getSeconds();
		if (data.NCI){
			NCI.setNciLatestValue(NCI.parceNumberForView(data.NCI), NCI.parceDateForLastUpdate(data.Time));
			params.NCI = data.NCI;
			NCI.addValueToChart(params);
		};
		if (data.QPS)
			NCI.setQpsLatestValue(NCI.parceNumberForView(data.QPS), NCI.parceDateForLastUpdate(data.Time));
		if (data.NEP)
			NCI.setNepLatestValue(NCI.parceNumberForView(data.NEP), NCI.parceDateForLastUpdate(data.Time));
	} else if (e.data.length > 60){
		NCI.chartData = [];
		//we recieve such format:
		// {"Time":"2013-10-27T13:01:09Z","NCI":99,
		// "Time":"2013-10-27T13:11:39Z","NCI":8,
		// "Time":"2013-10-27T13:22:15Z","NCI":18,
		// "Time":"2013-10-27T13:33:01Z","NCI":87} 
		var dimention = NCI.slider.xAxesScale[NCI.slider[0].value].indexDim;
		var recievedDataArray = e.data.substring(1, e.data.length - 1).split(',');
		var chartDataArray = [];<commit_msg>Add dimentions to live data<commit_after>if (typeof NCI === 'undefined')
   NCI = {};
   
NCI.start_time; // no data exists on the server before
NCI.time_adjustment = 0; //difference between client and server time in milliseconds
   
NCI.Connection = new WebSocket("ws://" + 'nci.ilabs.inca.infoblox.com:28080' + "/clientsock.yaws");
NCI.Connection.onopen = function () {
	console.log('opened');
	NCI.Connection.send('START_DATA');
};

NCI.Connection.onmessage  = function (e) {
	var data = eval("tmp = " + e.data );
	if (data.start_time){
	    NCI.time_adjustment = new Date() - new Date(data.current_time);
		return;
	};
	
	if (NCI.slider[0].value == 0){
		console.log(data);
		var params = {};
		params.time = new Date(data.Time).getMinutes() + "m" + new Date(data.Time).getSeconds() + "s";
		if (data.NCI){
			NCI.setNciLatestValue(NCI.parceNumberForView(data.NCI), NCI.parceDateForLastUpdate(data.Time));
			params.NCI = data.NCI;
			NCI.addValueToChart(params);
		};
		if (data.QPS)
			NCI.setQpsLatestValue(NCI.parceNumberForView(data.QPS), NCI.parceDateForLastUpdate(data.Time));
		if (data.NEP)
			NCI.setNepLatestValue(NCI.parceNumberForView(data.NEP), NCI.parceDateForLastUpdate(data.Time));
	} else if (e.data.length > 60){
		NCI.chartData = [];
		//we recieve such format:
		// {"Time":"2013-10-27T13:01:09Z","NCI":99,
		// "Time":"2013-10-27T13:11:39Z","NCI":8,
		// "Time":"2013-10-27T13:22:15Z","NCI":18,
		// "Time":"2013-10-27T13:33:01Z","NCI":87} 
		var dimention = NCI.slider.xAxesScale[NCI.slider[0].value].indexDim;
		var recievedDataArray = e.data.substring(1, e.data.length - 1).split(',');
		var chartDataArray = [];
{'fraction_non_alphanumeric': 0.18761496014714898, 'fraction_numerical': 0.04659717964438995, 'mean_word_length': 4.305691056910569, 'pattern_counts': {'":': 17, '<': 3, '<?xml version=': 0, '>': 5, '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': '1747397', 'n_tokens_mistral': 1444, 'n_tokens_neox': 1287, 'n_words': 198}