<commit_before>"use strict";

Template.builder.helpers({
    elapsed: function() {
        var duration = this.buildEnd - this.buildStart;
        return moment.duration(duration, "seconds").format("hh:mm:ss", { trim: false });
    },
    buildElapsed: function() {
        var now = new Date().getTime() / 1000;
        var duration = now - this.buildStart;
        return moment.duration(duration, "seconds").format("hh:mm:ss", { trim: false });
    },
    ended: function() {
        if (this.buildEnd) {
            return moment.unix(this.buildEnd).format("HH:mm:ss MMM Do");
        }
    },
    eta: function() {
        return moment.duration(this.eta, "seconds").format("hh:mm:ss", { trim: false });
    },
    formatDate: function(epoch) {
        return moment.unix(epoch).format();
    },
    isBuilding: function() {
        return this.state === 'building';
    },
    isIdle: function() {
        return this.state === 'idle';
    },<commit_msg>show ended as time ago<commit_after>"use strict";

Template.builder.helpers({
    elapsed: function() {
        var duration = this.buildEnd - this.buildStart;
        return moment.duration(duration, "seconds").format("hh:mm:ss", { trim: false });
    },
    buildElapsed: function() {
        var now = new Date().getTime() / 1000;
        var duration = now - this.buildStart;
        return moment.duration(duration, "seconds").format("hh:mm:ss", { trim: false });
    },
    ended: function() {
        if (this.buildEnd) {
            return moment.unix(this.buildEnd, "s").fromNow();
        }
    },
    eta: function() {
        return moment.duration(this.eta, "seconds").format("hh:mm:ss", { trim: false });
    },
    formatDate: function(epoch) {
        return moment.unix(epoch).format();
    },
    isBuilding: function() {
        return this.state === 'building';
    },
    isIdle: function() {
        return this.state === 'idle';
    },
{'fraction_non_alphanumeric': 0.1684045881126173, 'fraction_numerical': 0.004171011470281543, 'mean_word_length': 2.540590405904059, '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': '6671983', 'n_tokens_mistral': 582, 'n_tokens_neox': 577, 'n_words': 121}