<commit_before>﻿(function() {
    var common = (function() {
            return {
                getRequestId: function() {
                    // TODO: Get the current request id somehow
                    return $('#glimpse').attr('data-glimpse-id');
                }
            };
        })(),
        publishMessage = (function() {
            var getMessageId = function() {
                    // TODO: Generate random id for this message
                    return "e3599391-639a-4809-b7d3-10b286f59d3e";
                },
                getCurrentTime = function() {
                    return new Date();
                },
                buildContext = function() {
                    return {
                	    id: common.getRequestId(),
                        type: 'Request'
                    };
                },
                buildMessage = function(type, payload) {
                    return {
                        type: type,
                        payload: payload,
                        context: buildContext()
                    }
                },
                preProcessMessage = function(message) {<commit_msg>Setup client agent so that it can generate guids<commit_after>﻿(function() {
    var common = (function() {
            return {
                getRequestId: function() {
                    // TODO: Get the current request id somehow
                    return $('#glimpse').attr('data-glimpse-id');
                },
                getGuid: function() {
                    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
                            var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
                            return v.toString(16);
                        });
                }
            };
        })(),
        publishMessage = (function() {
            var getMessageId = function() { 
                    return common.getGuid();
                },
                getCurrentTime = function() {
                    return new Date();
                },
                buildContext = function() {
                    return {
                	    id: common.getRequestId(),
                        type: 'Request'
                    };
                },
                buildMessage = function(type, payload) {
                    return {
                        type: type,
                        payload: payload,
                        context: buildContext()
                    }
                },
                preProcessMessage = function(message) {
{'fraction_non_alphanumeric': 0.10092449922958398, 'fraction_numerical': 0.013097072419106317, 'mean_word_length': 0.9123711340206185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3402540', 'n_tokens_mistral': 621, 'n_tokens_neox': 556, 'n_words': 124}