lib/profile.js
function rows() {
        var fileTotals = filenames.reduce(reducePropToLength.bind(json), {}),
            fileOrder  = sort(fileTotals);
        return fileOrder.map(rowForFile);

        function rowForFile(filename) {
          var data = json[filename];
//          console.log(JSON.stringify(data, null, 2));
          return [filename]
            .concat(columnOrder
              .map(dataForColumn)
              .map(formatFloat))
            .map(leftJustify)
            .join(' ');

          function dataForColumn(column) {
            return data[column];
          }

          function formatFloat(number) {
            var padding  = '000',
                warning  = ((number > 99) ? '>' : ' '),
                integer  = (padding + Math.min(99, Math.floor(number))).slice(-2),
                fraction = (padding + Math.round(1000 * number)).slice(-3);
            return warning + integer + '.' + fraction;
          }
        }
      }
function rows() {
        var fileTotals = filenames.reduce(reducePropToLength.bind(json), {}),
            fileOrder  = sort(fileTotals);
        return fileOrder.map(rowForFile);

        function rowForFile(filename) {
          var data = json[filename];
//          console.log(JSON.stringify(data, null, 2));
          return [filename]
            .concat(columnOrder
              .map(dataForColumn)
              .map(formatFloat))
            .map(leftJustify)
            .join(' ');

          function dataForColumn(column) {
            return data[column];
          }

          function formatFloat(number) {
            var padding  = '000',
                warning  = ((number > 99) ? '>' : ' '),
                integer  = (padding + Math.min(99, Math.floor(number))).slice(-2),
                fraction = (padding + Math.round(1000 * number)).slice(-3);
            return warning + integer + '.' + fraction;
          }
        }
      }
function rows ( ) { var fileTotals = filenames . reduce ( reducePropToLength . bind ( json ) , { } ) , fileOrder = sort ( fileTotals ) ; return fileOrder . map ( rowForFile ) ; function rowForFile ( filename ) { var data = json [ filename ] ; //          console.log(JSON.stringify(data, null, 2)); return [ filename ] . concat ( columnOrder . map ( dataForColumn ) . map ( formatFloat ) ) . map ( leftJustify ) . join ( ' ' ) ; function dataForColumn ( column ) { return data [ column ] ; } function formatFloat ( number ) { var padding = '000' , warning = ( ( number > 99 ) ? '>' : ' ' ) , integer = ( padding + Math . min ( 99 , Math . floor ( number ) ) ) . slice ( - 2 ) , fraction = ( padding + Math . round ( 1000 * number ) ) . slice ( - 3 ) ; return warning + integer + '.' + fraction ; } } }
Map each filename to a data row, in decreasing time order.
Map each filename to a data row in decreasing time order .