StageVisitor badPlayers = new StageVisitor(){ byte[] seen = new byte[GraphManager.countStages(runtime.gm)+1];
private static int dotEstimate(GraphManager graphManager) { return (300*GraphManager.countStages(graphManager))+ (400*GraphManager.allPipes(graphManager).length); }
protected void logStageScheduleRates() { int totalStages = GraphManager.countStages(gm); for(int i=1;i<=totalStages;i++) { PronghornStage s = GraphManager.getStage(gm, i); if (null != s) { Object rate = GraphManager.getNota(gm, i, GraphManager.SCHEDULE_RATE, null); if (null == rate) { logger.debug("{} is running without breaks",s); } else { logger.debug("{} is running at rate of {}",s,rate); } } } }
private static StageScheduler defaultSchedulerImpl(GraphManager gm, final boolean threadLimitHard, final int targetThreadCountLimit) { assert(targetThreadCountLimit>0); final int countStages = GraphManager.countStages(gm); //disabled until we find a large machine for testing if (targetThreadCountLimit==Integer.MAX_VALUE) { //NOTE: this case will be rarely used, the other schedules are // more efficient however this scheduler is much simpler. logger.trace("Threads in use {}, one per stage.", countStages); return new ThreadPerStageScheduler(gm); } else { logger.trace("Targeted threads in use {}, fixed limit with fixed script. NOTE: More threads may be used use to graph complexity and telemetry usage.", targetThreadCountLimit); return new ScriptedFixedThreadsScheduler(gm, targetThreadCountLimit, threadLimitHard); } }
private static int[] buildCountOfStagesForEachThread(GraphManager graphManager, int rootCounter, int[] rootMemberCounter, IntHashTable rootsTable, IntArrayHolder lastKnownRoot) { Arrays.fill(rootMemberCounter, 0); //long start = System.nanoTime(); int countStages = GraphManager.countStages(graphManager); for(int stages=0; stages <= countStages; stages++) { PronghornStage stage = GraphManager.getStage(graphManager, stages); if (null!=stage) { rootMemberCounter[rootId(stage.stageId, rootsTable, lastKnownRoot)]++; } } //System.err.println("performance issue here calling this too often "+countStages+" duration "+(System.nanoTime()-start)); //logger.info("group counts "+Arrays.toString(rootMemberCounter)); return rootMemberCounter; }
private int[] buildCountOfStagesForEachThread(GraphManager graphManager, int rootCounter, int[] rootMemberCounter) { //long start = System.nanoTime(); Arrays.fill(rootMemberCounter, 0); int countStages = GraphManager.countStages(graphManager); for(int stages=1; stages <= countStages; stages++) { PronghornStage stage = GraphManager.getStage(graphManager, stages); if (null!=stage) { int rootId = rootId(stage.stageId, rootsTable); rootMemberCounter[rootId]++; GraphManager.addNota(graphManager, GraphManager.THREAD_GROUP, rootId, stage); } } //System.err.println("performance issue here calling this too often "+countStages+" duration "+(System.nanoTime()-start)); //logger.info("group counts "+Arrays.toString(rootMemberCounter)); return rootMemberCounter; }
int countStages = GraphManager.countStages(graphManager); if (countStages>logLimit) { logger.info("beginning to schedule work if {} stages into thread count of {}, this may take some time.", logger.info("finished inital sorting"); int totalThreads = GraphManager.countStages(graphManager);
int realStageCount = GraphManager.countStages(graphManager); if (realStageCount<=0) { System.out.println("Success!, You have a new empty project.");
public static PronghornStage[][] buildStageGroups(final GraphManager graphManager, int targetThreadCount, boolean enforceLimit) { final int countStages = GraphManager.countStages(graphManager); int bits = 1 + (int)Math.ceil(Math.log(countStages)/Math.log(2)); IntHashTable rootsTable = new IntHashTable(bits);
if (showRoots) { for(int stages=0; stages <= GraphManager.countStages(graphManager); stages++) {
final int totalStages = GraphManager.countStages(gm)+1; gm.stageDOTNames = new byte[totalStages][]; gm.stageDOTRate = new byte[totalStages][];
for(stages=0; stages<=GraphManager.countStages(graphManager); stages++) { PronghornStage stage = GraphManager.getStage(graphManager, stages); if (null!=stage) { for(stages=0; stages<=GraphManager.countStages(graphManager); stages++) { PronghornStage stage = GraphManager.getStage(graphManager, stages); if (null!=stage) { for(stages=0; stages<=GraphManager.countStages(graphManager); stages++) { for(stages=0; stages<=GraphManager.countStages(graphManager); stages++) { stages = GraphManager.countStages(graphManager); while (stages >= 0) {
stages = GraphManager.countStages(graphManager); while (stages>=0) { PronghornStage stage = GraphManager.getStage(graphManager, stages--);
long[] pipeTraffic, int[] msgPerSec) { int stages = GraphManager.countStages(m);