Skip to content

Commit

Permalink
Merge pull request #18299 from ghalliday/issue30588
Browse files Browse the repository at this point in the history
HPCC-30588 Publish descriptions for each of the statistic types

Reviewed-By: Jim DeFabia <[email protected]>
Reviewed-by: Gordon Smith <[email protected]>
Reviewed-by: Jake Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Feb 22, 2024
2 parents 7c47138 + b0f936e commit b713bbd
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 150 deletions.
4 changes: 2 additions & 2 deletions ecl/eclcc/eclcc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1602,9 +1602,9 @@ void EclCC::processSingleQuery(const EclRepositoryManager & localRepositoryManag
{
const BlockIoStats summaryIo = systemIoFinishInfo->querySummaryStats() - systemIoStartInfo->querySummaryStats();
if (summaryIo.rd_sectors)
updateWorkunitStat(instance.wu, SSTcompilestage, scopeName, StSizeOsDiskRead, NULL, summaryIo.rd_sectors * summaryIo.getSectorSize());
updateWorkunitStat(instance.wu, SSTcompilestage, scopeName, StSizeDiskRead, NULL, summaryIo.rd_sectors * summaryIo.getSectorSize());
if (summaryIo.wr_sectors)
updateWorkunitStat(instance.wu, SSTcompilestage, scopeName, StSizeOsDiskWrite, NULL, summaryIo.wr_sectors * summaryIo.getSectorSize());
updateWorkunitStat(instance.wu, SSTcompilestage, scopeName, StSizeDiskWrite, NULL, summaryIo.wr_sectors * summaryIo.getSectorSize());
}
}

Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_workunits.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EspInclude(ws_workunits_queryset_req_resp);

ESPservice [
auth_feature("DEFERRED"), //This declares that the method logic handles feature level authorization
version("1.98"), default_client_version("1.98"), cache_group("ESPWsWUs"),
version("1.99"), default_client_version("1.99"), cache_group("ESPWsWUs"),
noforms,exceptions_inline("./smc_xslt/exceptions.xslt"),use_method_name] WsWorkunits
{
ESPmethod [cache_seconds(60), resp_xsl_default("/esp/xslt/workunits.xslt")] WUQuery(WUQueryRequest, WUQueryResponse);
Expand Down
1 change: 1 addition & 0 deletions esp/scm/ws_workunits_struct.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ ESPStruct WUDetailsMetaProperty
{
string Name;
ESPenum WUDetailsAttrValueType ValueType;
[min_ver("1.99")] string Description;
};

ESPStruct WUDetailsActivityInfo
Expand Down
10 changes: 7 additions & 3 deletions esp/services/ws_workunits/ws_workunitsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4234,7 +4234,7 @@ bool CWsWorkunitsEx::onWUAnalyseHotspot(IEspContext &context, IEspWUAnalyseHotsp
}


static void getWUDetailsMetaProperties(IArrayOf<IEspWUDetailsMetaProperty> & properties)
static void getWUDetailsMetaProperties(double version, IArrayOf<IEspWUDetailsMetaProperty> & properties)
{
for (unsigned sk=StKindAll+1; sk<StMax;++sk)
{
Expand All @@ -4244,6 +4244,8 @@ static void getWUDetailsMetaProperties(IArrayOf<IEspWUDetailsMetaProperty> & pro
Owned<IEspWUDetailsMetaProperty> property = createWUDetailsMetaProperty("","");
property->setName(s);
property->setValueType(CWUDetailsAttrValueType_Single);
if (version >= 1.99)
property->setDescription(queryStatisticDescription((StatisticKind)sk));
properties.append(*property.getClear());
}
}
Expand Down Expand Up @@ -4301,8 +4303,10 @@ bool CWsWorkunitsEx::onWUDetailsMeta(IEspContext &context, IEspWUDetailsMetaRequ
{
try
{
double version = context.getClientVersion();

IArrayOf<IEspWUDetailsMetaProperty> properties;
getWUDetailsMetaProperties(properties);
getWUDetailsMetaProperties(version, properties);
resp.setProperties(properties);

StringArray scopeTypes;
Expand Down Expand Up @@ -4339,7 +4343,7 @@ class WUDetailsMetaTest : public CppUnit::TestFixture
// These calls also check that all the calls required to build WUDetailsMeta
// are successful.
IArrayOf<IEspWUDetailsMetaProperty> properties;
getWUDetailsMetaProperties(properties);
getWUDetailsMetaProperties(1.98, properties);
unsigned expectedOrdinalityProps = StMax - (StKindAll + 1) + (WaMax-WaKind);
ASSERT(properties.ordinality()==expectedOrdinalityProps);

Expand Down
Loading

0 comments on commit b713bbd

Please sign in to comment.