Lumenize icon indicating copy to clipboard operation
Lumenize copied to clipboard

percentile coverage not working in deriveFieldsOnOutput

Open lmaccherone opened this issue 12 years ago • 0 comments

The following results in an error

calculate: function(afterCalculate, callbackScope) {
    var self = this;
    var convertTicksToHours = Ext.bind(this.convertTicksToHours, this);
    async.parallel(
        {
            tiscResults: Ext.bind(this.getTISCResults, this),
            completedOIDs: Ext.bind(this.getCompletedOIDs, this),
        },

        function(err, results){

            var cube = new Lumenize.OLAPCube({
                metrics: [
                    { field: "ticks", f: "values"},
                    { field: "ticks", f: "sum"},
                    { field: "ticks", f: "sumSquares"},
                    { field: "ticks", f: "average", as: "mean"}

                ],
                deriveFieldsOnInput: [
                    { field: "ticks", f: convertTicksToHours, as: "hours" },
                ],
                deriveFieldsOnOutput: [
                    { field: "hours", f: "p50" }
                    // { field: "hours", f: "p50" },
                    // { field: "mean", f: "p75" }
                //     { field: "hours", f: "p95" },
                //     { field: "hours", f: "p99" },
                //     { field: "hours", f: "standardDeviation", as: "StandardDeviation" }
                ],
                dimensions: [
                    { field: "_ProjectHierarchy_lastValue", type: "hierarchy" },
                    { field: "TimeFrameBuckets" }
                ]
            });

            var ticCounts = results.tiscResults;
            var completed = results.completedOIDs;
            var startOn = self.getEpoch();
            var endBefore = self.getEndBefore();
            var periods = [1, 3, 6];
            for(var i=ticCounts.length -1; i >= 0; i--){
                var ticCount = ticCounts.pop();
                if( completed[ticCount.ObjectID] ){

                    // add the time buckets this falls into
                    ticCount.TimeFrameBuckets = Rally.redpill.util.TimeFrameBuckets.calculate(
                        startOn, endBefore,
                        ticCount._ValidTo_lastValue,
                        periods);

                    cube.addFacts(ticCount);
                }
            }


            var metrics = self.convertCubeToMetrics(cube, afterCalculate, callbackScope);
        }
    ); // end parallel

},

lmaccherone avatar Feb 19 '13 00:02 lmaccherone