<commit_before>'use strict';

pinpointApp.constant('callStacksConfig', {
    agentDividerWarningTime : 500,
    agentDividerClasses : [
        'first',
        'second',
        'third',
        'forth',
        'fifth'
    ]
});

pinpointApp.directive('callStacks', [ 'callStacksConfig', function (cfg) {
    return {
        restrict: 'EA',
        replace: true,
        templateUrl: 'views/callStacks.html',
        scope : {
            namespace : '@' // string value
        },
        link: function postLink(scope, element, attrs) {

            // define private variables
            var sLastAgent, nLastExecTime;

            // define private variables of methods
            var initialize, addAgentDividerClassToTransactionDetail;

            // initialize scope variables
            scope.transactionDetail = null;

            /**
             * initialize
             * @param transactionDetail
             */
            initialize = function (transactionDetail) {
                scope.transactionDetail = transactionDetail;
                scope.key = transactionDetail.callStackIndex;
                scope.barRatio = 100 / (transactionDetail.callStack[0][scope.key.end] - transactionDetail.callStack[0][scope.key.begin]);
                addAgentDividerClassToTransactionDetail();
                scope.$digest();
                var oTreeGridTable = new TreeGridTable({
                    tableId : element.find('table'), // element should be a table of DOM, so it should be replace:true at the top
                    height : "auto"
                });<commit_msg>[임대현] [NOBTS] callstacks refactoring<commit_after>'use strict';

pinpointApp.constant('callStacksConfig', {
    agentDividerWarningTime : 500,
    agentDividerClasses : [
        'first',
        'second',
        'third',
        'forth',
        'fifth'
    ]
});

pinpointApp.directive('callStacks', [ 'callStacksConfig', function (cfg) {
    return {
        restrict: 'EA',
        replace: true,
        templateUrl: 'views/callStacks.html',
        scope : {
            namespace : '@' // string value
        },
        link: function postLink(scope, element, attrs) {

            // define private variables
            var sLastAgent, nLastExecTime;

            // define private variables of methods
            var initialize, addAgentDividerClassToTransactionDetail;

            // initialize scope variables
            scope.transactionDetail = null;

            /**
             * initialize
             * @param t transactionDetail
             */
            initialize = function (t) {
                scope.transactionDetail = t;
                scope.key = t.callStackIndex;
                scope.barRatio = 100 / (t.callStack[0][scope.key.end] - t.callStack[0][scope.key.begin]);
                addAgentDividerClassToTransactionDetail();
                scope.$digest();
                var oTreeGridTable = new TreeGridTable({
                    tableId : element.find('table'), // element should be a table of DOM, so it should be replace:true at the top
                    height : "auto"
                });
{'fraction_non_alphanumeric': 0.10066900286715515, 'fraction_numerical': 0.005097164702134438, 'mean_word_length': 1.7714033539276257, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2644412', 'n_tokens_mistral': 806, 'n_tokens_neox': 775, 'n_words': 182}