Subversion Repositories DevTools

Rev

Rev 7164 | Rev 7176 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7164 Rev 7169
Line 45... Line 45...
45
 
45
 
46
    /**name associated with the baseline
46
    /**name associated with the baseline
47
     * @attribute
47
     * @attribute
48
     */
48
     */
49
    public String mBaselineName = "";
49
    public String mBaselineName = "";
-
 
50
    
-
 
51
    /** Data to control the build plan
-
 
52
     * 
-
 
53
     */
-
 
54
    public PlanControl mPlanControl = new PlanControl();
50
 
55
 
51
    /**Collection of build exceptions associated with the baseline
56
    /**Collection of build exceptions associated with the baseline
52
     * Used to determine (and report) what change in build exceptions happens as part of planRelease
57
     * Used to determine (and report) what change in build exceptions happens as part of planRelease
53
     * Daemon centric
58
     * Daemon centric
54
     * @aggregation shared
59
     * @aggregation shared
Line 927... Line 932...
927
                    {
932
                    {
928
                        mBuildOrder.add( new PlannedPackage(p) );
933
                        mBuildOrder.add( new PlannedPackage(p) );
929
                    }
934
                    }
930
                }
935
                }
931
                
936
                
-
 
937
                //
-
 
938
                //  Examine Plan control
-
 
939
                //      DropPlan - do not use the basic plan. This is a one-shot request
-
 
940
                //      Threshold == 0. Always use a full plan
-
 
941
                if (mPlanControl.mDumpPlan || mPlanControl.mThreshold == 0)
-
 
942
                {
-
 
943
                    mLogger.warn("Drop basicPlan and use fullPlan");
-
 
944
                    basicPlan.planTime = 0;
-
 
945
                    basicPlan.planCollection.clear();
-
 
946
                    
-
 
947
                    //  Always reset the one-shot request to drop the current plan
-
 
948
                    mReleaseManager.resetPlanControl(mBaseline);
-
 
949
                }
-
 
950
                
932
                //  First attempt
951
                //  First attempt
933
                //  Insert all the WIPs and RIPPLES into the buildset. 
952
                //  Insert all the WIPs and RIPPLES into the buildset. 
934
                //  Generate a plan and see how much the time is extended.
953
                //  Generate a plan and see how much the time is extended.
935
                //
954
                //
936
                //  Don't modify mPackageCollection, although data in the 'Package' in the underlying packages may change
955
                //  Don't modify mPackageCollection, although data in the 'Package' in the underlying packages may change
Line 940... Line 959...
940
                //  Decide with plan to use
959
                //  Decide with plan to use
941
                //  At the moment we have, at most two.
960
                //  At the moment we have, at most two.
942
                //      - (basic) Current Release ripples
961
                //      - (basic) Current Release ripples
943
                //      - (full) Current Release + All WIPS and RIPPLES
962
                //      - (full) Current Release + All WIPS and RIPPLES
944
                //
963
                //
945
                //  If we have both then if the full plan is < 20% longer than the basic plan, use the full plan
964
                //  If we have both then use the planContol threshold to determine which plan to use
946
                //  Otherwise we use basic plan FOLLOWED by the a MODIFIED full plan (one without the natural ripples)
965
                //  The threshold number is taken as a percent by which the fullPlan Time impacts basicPlan time
-
 
966
                //  before the fullPlan will be rejected.
-
 
967
                //  ie: threshold = 20.  If fullPlan is  20% longer that the basicPlan, then use the basicPlan then a modified fullPlan (Cautious)
-
 
968
                //  ie: threshold = 100. If fullPlan is 100% longer that the basicPlan, then use the basicPlan then a modified fullPlan (Aggressive)
-
 
969
                //
-
 
970
                //  A modified fullPlan is one without the natural ripples as these will have been done in the basicPlan
-
 
971
                //
947
                //  Add the planned packages into the buildOrder
972
                //  Add the planned packages into the buildOrder
948
    
973
    
949
                if( !basicPlan.planCollection.isEmpty() && !fullPlan.planCollection.isEmpty() )
974
                if( !basicPlan.planCollection.isEmpty() && !fullPlan.planCollection.isEmpty() )
950
                {
975
                {
951
                    mLogger.error("Two plan selection: {} {}, {} <= {} = {}", basicPlan.planTime,fullPlan.planTime, basicPlan.planTime * 1.2, fullPlan.planTime, (basicPlan.planTime * 12) <= (fullPlan.planTime * 10) );
976
                    //  Calculate the build impact as a percentage
952
                    
977
                    //  The impact of the fullPlan over the basicPlan
953
                    //
978
                    //
954
                    //  Report numbers for Bryan - can be removed after Aug-2019
-
 
955
                    //  See PX-14283
-
 
956
                    //
-
 
957
                    {
-
 
958
                        String bi = "--";
979
                    int buildImpact = 0;
959
                        String be = "--";
-
 
960
                        if (fullPlan.planTime != basicPlan.planTime &&  basicPlan.planTime  != 0) {
980
                    if (fullPlan.planTime != basicPlan.planTime &&  basicPlan.planTime  != 0) {
961
                            bi = Float.toString( (fullPlan.planTime - basicPlan.planTime) / (float)basicPlan.planTime);
981
                        buildImpact = ((fullPlan.planTime - basicPlan.planTime) * 100) / (basicPlan.planTime);
962
                            be = Float.toString( (float)fullPlan.planTime  / (fullPlan.planTime - basicPlan.planTime));
-
 
963
                        }
-
 
964
                        mLogger.error("PLAN STATS: Estimated time to complete current plan (ETC): {}", basicPlan.planTime);
-
 
965
                        mLogger.error("PLAN STATS: Estimated time to full plan (PBT): {}", fullPlan.planTime);
-
 
966
                        mLogger.error("PLAN STATS: Build Impact (BI): {}", bi);
-
 
967
                        mLogger.error("PLAN STATS: Build Efficiency (BE): {}", be);
-
 
968
                    }
982
                    }
969
                    
-
 
970
                    
-
 
-
 
983
                    mLogger.error("Two plan selection: Basic:{} Full:{}, Impact:{}% Threshold:{}% Exceeded: {}", basicPlan.planTime,fullPlan.planTime, buildImpact, mPlanControl.mThreshold, buildImpact >= mPlanControl.mThreshold);
-
 
984
 
971
                    if ( (basicPlan.planTime * 12) <= (fullPlan.planTime * 10) )
985
                    if ( buildImpact >= mPlanControl.mThreshold )
972
                    {
986
                    {
-
 
987
                        //  BuildImpact too high
973
                        //  Use the basic plan FOLLOWED by a plan that does not include
988
                        //  Use the basic plan FOLLOWED by a plan that does not include
974
                        //      Ripples done by the basic plan
989
                        //      Ripples done by the basic plan
975
                        //      WIPs/RIPPLES done in the course of doing the basic plan
990
                        //      WIPs/RIPPLES done in the course of doing the basic plan
976
                        mLogger.error("Use basic plan, then modified full plan");
991
                        mLogger.error("Use basic plan, then modified full plan");
977
                        mBuildOrder.addAll(basicPlan.planCollection);
992
                        mBuildOrder.addAll(basicPlan.planCollection);
Line 1947... Line 1962...
1947
                setMailGlobalTarget(mReleaseManager.queryGlobalAddresses());
1962
                setMailGlobalTarget(mReleaseManager.queryGlobalAddresses());
1948
                phase.setPhase("queryProjectEmail");
1963
                phase.setPhase("queryProjectEmail");
1949
                mMailGlobalCollection = mReleaseManager.queryProjectEmail(mBaseline);
1964
                mMailGlobalCollection = mReleaseManager.queryProjectEmail(mBaseline);
1950
                phase.setPhase("mMailGlobalTarget");
1965
                phase.setPhase("mMailGlobalTarget");
1951
                mMailGlobalCollection.add(0,getMailGlobalTarget());
1966
                mMailGlobalCollection.add(0,getMailGlobalTarget());
-
 
1967
                phase.setPhase("mPlanControl");
-
 
1968
                mReleaseManager.queryPlanControl(mBaseline, mPlanControl);
1952
            }
1969
            }
1953
            phase.setPhase("queryBaselineName");
1970
            phase.setPhase("queryBaselineName");
1954
            mBaselineName = mReleaseManager.queryBaselineName(mBaseline);
1971
            mBaselineName = mReleaseManager.queryBaselineName(mBaseline);
1955
            phase.setPhase("Done");
1972
            phase.setPhase("Done");
1956
        }
1973
        }