Skip to content

Commit

Permalink
HPCC-29790 Use the new stage and operation prefixes where appropriate
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Jan 19, 2024
1 parent eb65091 commit 52d7597
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 65 deletions.
10 changes: 5 additions & 5 deletions ecl/eclcc/eclcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ void EclCC::processSingleQuery(const EclRepositoryManager & localRepositoryManag
if (exportDependencies || optMetaLocation)
parseCtx.nestedDependTree.setown(createPTree("Dependencies", ipt_fast));

addTimeStamp(instance.wu, SSToperation, "compile:parse", StWhenStarted);
addTimeStamp(instance.wu, SSToperation, "compile:>parse", StWhenStarted);
try
{
HqlLookupContext ctx(parseCtx, &errorProcessor, instance.dataServer);
Expand Down Expand Up @@ -1464,14 +1464,14 @@ void EclCC::processSingleQuery(const EclRepositoryManager & localRepositoryManag
unsigned __int64 parseTimeNs = cycle_to_nanosec(get_cycles_now() - startCycles);
instance.stats.parseTime = (unsigned)nanoToMilli(parseTimeNs);

updateWorkunitStat(instance.wu, SSToperation, "compile:parse", StTimeElapsed, NULL, parseTimeNs);
updateWorkunitStat(instance.wu, SSToperation, "compile:>parse", StTimeElapsed, NULL, parseTimeNs);
stat_type sourceDownloadTime = localRepositoryManager.getStatistic(StTimeElapsed);
if (sourceDownloadTime)
updateWorkunitStat(instance.wu, SSToperation, "compile:parse:download", StTimeElapsed, NULL, sourceDownloadTime);
updateWorkunitStat(instance.wu, SSToperation, "compile:>parse:>download", StTimeElapsed, NULL, sourceDownloadTime);

if (optExtraStats)
{
updateWorkunitStat(instance.wu, SSToperation, "compile:cache", StNumAttribsProcessed, NULL, parseCtx.numAttribsProcessed);
updateWorkunitStat(instance.wu, SSToperation, "compile:>parse", StNumAttribsProcessed, NULL, parseCtx.numAttribsProcessed);
}

if (exportDependencies)
Expand Down Expand Up @@ -1576,7 +1576,7 @@ void EclCC::processSingleQuery(const EclRepositoryManager & localRepositoryManag
if (optGatherDiskStats)
systemIoFinishInfo.setown(new OsDiskStats(true));
instance.stats.generateTime = (unsigned)nanoToMilli(totalTimeNs) - instance.stats.parseTime;
const char *scopeName = optCompileBatchOut.isEmpty() ? "compile" : "compile:generate";
const char *scopeName = optCompileBatchOut.isEmpty() ? "compile" : "compile:>generate";
if (optCompileBatchOut.isEmpty())
updateWorkunitStat(instance.wu, SSToperation, scopeName, StTimeElapsed, NULL, totalTimeNs);

Expand Down
6 changes: 3 additions & 3 deletions ecl/eclccserver/eclccserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
if (!extension || strncmp(extension, ".o", 2) == 0)
filename.set("link");

scope.append("compile:compile c++:").append(filename);
scope.append("compile:>compile c++:").append(filename);
workunit->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSToperation, scope, StTimeElapsed, NULL, compileTimer.elapsedNs(), 1, 0, StatsMergeReplace);
}

Expand Down Expand Up @@ -717,10 +717,10 @@ class EclccCompileThread : implements IPooledThread, implements IErrorReporter,
if (retcode == 0 && compileCppSeparately)
{
cycle_t startCompileCpp = get_cycles_now();
workunit->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSToperation, "compile:compile c++", StWhenStarted, NULL, getTimeStampNowValue(), 1, 0, StatsMergeAppend);
workunit->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSToperation, "compile:>compile c++", StWhenStarted, NULL, getTimeStampNowValue(), 1, 0, StatsMergeAppend);
retcode = doCompileCpp(abortWaiter, wuid, workunit->getDebugValueInt("maxCompileThreads", defaultMaxCompileThreads));
unsigned __int64 elapsed_compilecpp = cycle_to_nanosec(get_cycles_now() - startCompileCpp);
workunit->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSToperation, "compile:compile c++", StTimeElapsed, NULL, elapsed_compilecpp, 1, 0, StatsMergeReplace);
workunit->setStatistic(queryStatisticsComponentType(), queryStatisticsComponentName(), SSToperation, "compile:>compile c++", StTimeElapsed, NULL, elapsed_compilecpp, 1, 0, StatsMergeReplace);
}
if (compileCppSeparately)
{
Expand Down
2 changes: 1 addition & 1 deletion ecl/hql/hqlexpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ void HqlLookupContext::reportTiming(const char * name)
__uint64 localTime = cycle_to_nanosec(elapsedCycles - childCycles);

StringBuffer scope;
scope.append("compiler::parse::").append(name);
scope.append("compile::>parse::>").append(name);
parseCtx.statsTarget.addStatistic(SSToperation, scope, StTimeTotalExecute, nullptr, totalTime, 1, 0, StatsMergeSum);
parseCtx.statsTarget.addStatistic(SSToperation, scope, StTimeLocalExecute, nullptr, localTime, 1, 0, StatsMergeSum);

Expand Down
2 changes: 1 addition & 1 deletion ecl/hql/hqltrans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void HqlTransformerInfo::gatherTransformStats(IStatisticTarget & target) const
if (numInstances)
{
StringBuffer scope;
scope.append("compile:transform:").append(name);
scope.append("compile:>transform:>").append(name);
target.addStatistic(SSToperation, scope, StNumStarts, nullptr, numInstances, 1, 0, StatsMergeSum);
stats.gatherTransformStats(target, scope);
}
Expand Down
12 changes: 6 additions & 6 deletions ecl/hqlcpp/hqlecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ bool HqlDllGenerator::generateCode(HqlQueryContext & query)
noOutput = true;
{
// ensure warnings/errors are available before we do the processing...
addTimeStamp(wu, SSToperation, "compile:generate", StWhenStarted);
addTimeStamp(wu, SSToperation, "compile:>generate", StWhenStarted);
wu->commit();

cycle_t startCycles = get_cycles_now();
Expand Down Expand Up @@ -583,7 +583,7 @@ bool HqlDllGenerator::generateCode(HqlQueryContext & query)

doExpand(translator);
unsigned __int64 elapsed = cycle_to_nanosec(get_cycles_now() - startCycles);
updateWorkunitStat(wu, SSToperation, "compile:generate", StTimeElapsed, NULL, elapsed);
updateWorkunitStat(wu, SSToperation, "compile:>generate", StTimeElapsed, NULL, elapsed);

if (wu->getDebugValueBool("addMemoryToWorkunit", true))
{
Expand Down Expand Up @@ -633,7 +633,7 @@ void HqlDllGenerator::insertStandAloneCode()
void HqlDllGenerator::doExpand(HqlCppTranslator & translator)
{
CCycleTimer elapsedTimer;
addTimeStamp(wu, SSToperation, "compile:generate:write c++", StWhenStarted);
addTimeStamp(wu, SSToperation, "compile:>generate:>write c++", StWhenStarted);

bool isMultiFile = translator.spanMultipleCppFiles();
CompilerType targetCompiler = translator.queryOptions().targetCompiler;
Expand All @@ -655,7 +655,7 @@ void HqlDllGenerator::doExpand(HqlCppTranslator & translator)
}
}

updateWorkunitStat(wu, SSToperation, "compile:generate:write c++", StTimeElapsed, NULL, elapsedTimer.elapsedNs());
updateWorkunitStat(wu, SSToperation, "compile:>generate:>write c++", StTimeElapsed, NULL, elapsedTimer.elapsedNs());
}

bool HqlDllGenerator::abortRequested()
Expand All @@ -666,7 +666,7 @@ bool HqlDllGenerator::abortRequested()
bool HqlDllGenerator::doCompile(ICppCompiler * compiler)
{
cycle_t startCycles = get_cycles_now();
addTimeStamp(wu, SSToperation, "compile:compile c++", StWhenStarted);
addTimeStamp(wu, SSToperation, "compile:>compile c++", StWhenStarted);
ForEachItemIn(i, sourceFiles)
compiler->addSourceFile(sourceFiles.item(i), sourceFlags.item(i));

Expand Down Expand Up @@ -735,7 +735,7 @@ bool HqlDllGenerator::doCompile(ICppCompiler * compiler)
}

unsigned __int64 elapsed = cycle_to_nanosec(get_cycles_now() - startCycles);
updateWorkunitStat(wu, SSToperation, "compile:compile c++", StTimeElapsed, NULL, elapsed);
updateWorkunitStat(wu, SSToperation, "compile:>compile c++", StTimeElapsed, NULL, elapsed);
}
//Keep the files if there was a compile error.
if (ok && deleteGenerated)
Expand Down
6 changes: 3 additions & 3 deletions ecl/hqlcpp/hqlhtcpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6130,7 +6130,7 @@ bool HqlCppTranslator::buildCode(HqlQueryContext & query, const char * embeddedL
complexityText.append(getComplexity(workflow));
wu()->setDebugValue("__Calculated__Complexity__", complexityText, true);
if (options.timeTransforms)
noteFinishedTiming("compile:complexity", startCycles);
noteFinishedTiming("compile:>complexity", startCycles);
}

buildRowAccessors();
Expand Down Expand Up @@ -6220,7 +6220,7 @@ bool HqlCppTranslator::buildCpp(IHqlCppInstance & _code, HqlQueryContext & query
cycle_t startCycles = get_cycles_now();
peepholeOptimize(*code, *this);
if (options.timeTransforms)
noteFinishedTiming("compile:transform:peephole", startCycles);
noteFinishedTiming("compile:>transform:>peephole", startCycles);
}
}
catch (IException * e)
Expand Down Expand Up @@ -9767,7 +9767,7 @@ IHqlExpression * HqlCppTranslator::getResourcedGraph(IHqlExpression * expr, IHql
return NULL;

if (options.timeTransforms)
noteFinishedTiming("compile:resource graph", startCycles);
noteFinishedTiming("compile:>resource graph", startCycles);
traceExpression("AfterResourcing", resourced);

if (options.regressionTest)
Expand Down
6 changes: 3 additions & 3 deletions ecl/hqlcpp/hqlnlp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityParse(BuildCtx & ctx, IHqlExpr
doBuildParseValidators(instance->nestedctx, expr);
doBuildParseExtra(instance->startctx, expr);
if (options.timeTransforms)
noteFinishedTiming("compile:PARSE:prepare", startPrepareCycles);
noteFinishedTiming("compile:>PARSE:>prepare", startPrepareCycles);

MemoryBuffer buffer;
cycle_t startCompileCycles = get_cycles_now();
Expand All @@ -729,7 +729,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityParse(BuildCtx & ctx, IHqlExpr

doBuildParseCompiled(instance->classctx, buffer);
if (options.timeTransforms)
noteFinishedTiming("compile:PARSE:compile", startCompileCycles);
noteFinishedTiming("compile:>PARSE:>compile", startCompileCycles);

nlpParse->buildProductions(*this, instance->classctx, instance->startctx);

Expand Down Expand Up @@ -763,7 +763,7 @@ ABoundActivity * HqlCppTranslator::doBuildActivityParse(BuildCtx & ctx, IHqlExpr
buildInstanceSuffix(instance);
buildConnectInputOutput(ctx, instance, boundDataset, 0, 0);
if (options.timeTransforms)
noteFinishedTiming("compile:PARSE", startCycles);
noteFinishedTiming("compile:>PARSE", startCycles);

return instance->getBoundActivity();
}
Expand Down
6 changes: 3 additions & 3 deletions ecl/hqlcpp/hqlttcpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14168,7 +14168,7 @@ void HqlCppTranslator::normalizeGraphForGeneration(HqlExprArray & exprs, HqlQuer
cycle_t startCycles = get_cycles_now();
pickBestEngine(exprs);
if (options.timeTransforms)
noteFinishedTiming("compile:transform:pick engine", startCycles);
noteFinishedTiming("compile:>transform:>pick engine", startCycles);
}
#endif

Expand Down Expand Up @@ -14375,7 +14375,7 @@ bool HqlCppTranslator::transformGraphForGeneration(HqlQueryContext & query, Work
cycle_t startCycles = get_cycles_now();
pickBestEngine(workflow);
if (options.timeTransforms)
noteFinishedTiming("compile:transform:pick engine", startCycles);
noteFinishedTiming("compile:>transform:>pick engine", startCycles);
}
#endif
updateClusterType();
Expand All @@ -14397,7 +14397,7 @@ bool HqlCppTranslator::transformGraphForGeneration(HqlQueryContext & query, Work
cycle_t startCycles = get_cycles_now();
checkDependencyConsistency(curWorkflow.queryExprs());
if (options.timeTransforms)
noteFinishedTiming("compile:transform:check dependency", startCycles);
noteFinishedTiming("compile:>transform:>check dependency", startCycles);
}

traceExpressions("afterTransformGraphForGeneration", curWorkflow);
Expand Down
49 changes: 9 additions & 40 deletions system/jlib/jptree-attrvalues.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,47 +66,16 @@
"cnt",
"coLocal",
"compile",
"compile:compile c++",
"compiled",
"compile:generate c++",
"compile:generate PARSE",
"compile:generate PARSE:analyse",
"compile:generate PARSE:compile",
"compile:generate PARSE:create structure",
"compile:generate PARSE:generate",
"compile:generate PARSE:optimize",
"compile:generate PARSE:prepare",
"compile:global implicit projects",
"compile:implicit projects",
"compile:optimize graph",
"compile:parseTime",
"compile:peephole optimize",
"compile:resource graph",
"compile:tree transform",
"compile:tree transform: check dependency",
"compile:tree transform: compound activity",
"compile:tree transform: convert logical",
"compile:tree transform: convert SetResult to Extract",
"compile:tree transform: expand delayed calls",
"compile:tree transform: global fold",
"compile:tree transform: hoist nested compound",
"compile:tree transform: merge thor",
"compile:tree transform: migrate",
"compile:tree transform: normalize",
"compile:tree transform: normalize.annotations",
"compile:tree transform: normalize.DFStransform",
"compile:tree transform: normalize.initial",
"compile:tree transform: normalize.KeyedProjectTransformer",
"compile:tree transform: normalize.linkedChildRows",
"compile:tree transform: normalize result",
"compile:tree transform: normalize.scope",
"compile:tree transform: optimize activities",
"compile:tree transform: optimize disk read",
"compile:tree transform: spot global cse",
"compile:tree transform: stored results",
"compile:tree transform: substituteClusterSize",
"compile:tree transform: thor hole",
"compile:write c++",
"compile:>compile c++",
"compile:>generate",
"compile:>generate:>write c++",
"compile:>parse",
"compile:>parse:>download",
"compile:>resource graph",
"compile:>transform",
"compile:>transform:>peephole",
"compile:>transform:>pick engine",
"compiling",
"completed",
"componentfiles/configxml",
Expand Down

0 comments on commit 52d7597

Please sign in to comment.