<commit_before>/*
 * Copyright 2013-2015, Teradata, Inc. All rights reserved.
 */
(function () {
    'use strict';

    angular.module('benchmarkServiceUI.filters', [])
        .filter('duration', ['numberFilter', function (numberFilter) {
            return function (value) {
                if ((value / 1000) < 1) {
                    return numberFilter(value, 3, 4) + ' ms';
                }
                value /= 1000;

                if ((value / 60) < 1) {
                    return numberFilter(value, 3, 4) + ' s';
                }
                value /= 60;

                if ((value / 60) < 1) {
                    return numberFilter(value, 3, 4) + ' m';
                }

                return numberFilter(value, 3, 4) + ' h';
            }
        }])
        .filter('unit', ['numberFilter', 'durationFilter', function (numberFilter, durationFilter) {
            return function (value, unit) {
                var outputValueText = '';
                var outputUnitText = '';

                if (unit === 'MILLISECONDS') {
                    outputValueText = durationFilter(value)<commit_msg>Fixing duration filter.<commit_after>/*
 * Copyright 2013-2015, Teradata, Inc. All rights reserved.
 */
(function () {
    'use strict';

    angular.module('benchmarkServiceUI.filters', [])
        .filter('duration', ['numberFilter', function (numberFilter) {
            return function (value) {
                if ((value / 1000) < 1) {
                    return numberFilter(value, 3, 4) + ' ms';
                }
                value /= 1000;

                if ((value / 60) < 1) {
                    return numberFilter(value, 3, 4) + ' s';
                }
                value /= 60;

                if ((value / 60) < 1) {
                    return numberFilter(value, 3, 4) + ' m';
                }
                value /= 60;

                return numberFilter(value, 3, 4) + ' h';
            }
        }])
        .filter('unit', ['numberFilter', 'durationFilter', function (numberFilter, durationFilter) {
            return function (value, unit) {
                var outputValueText = '';
                var outputUnitText = '';

                if (unit === 'MILLISECONDS') {
                    outputValueText = durationFilter(value)
{'fraction_non_alphanumeric': 0.13124728378965667, 'fraction_numerical': 0.02955236853541938, 'mean_word_length': 1.368312757201646, 'pattern_counts': {'":': 0, '<': 9, '<?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': '3426269', 'n_tokens_mistral': 688, 'n_tokens_neox': 577, 'n_words': 151}