Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-30588 Publish descriptions for each of the statistic types #18299

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading