Skip to content

Commit

Permalink
HPCC-29790 Clean up missing entries from stats type processing
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 52d7597 commit 1850c53
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions system/jlib/jstats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void setStatisticsComponentName(StatisticCreatorType processType, const char * p
// Textual forms of the different enumerations, first items are for none and all.
static constexpr const char * const measureNames[] = { "", "all", "ns", "ts", "cnt", "sz", "cpu", "skw", "node", "ppm", "ip", "cy", "en", "txt", "bool", "id", "fname", "cost", NULL };
static constexpr const char * const creatorTypeNames[]= { "", "all", "unknown", "hthor", "roxie", "roxie:s", "thor", "thor:m", "thor:s", "eclcc", "esp", "summary", NULL };
static constexpr const char * const scopeTypeNames[] = { "", "all", "global", "graph", "subgraph", "activity", "allocator", "section", "stage", "dfu", "edge", "function", "workflow", "child", "file", "channel", "unknown", nullptr };
static constexpr const char * const scopeTypeNames[] = { "", "all", "global", "graph", "subgraph", "activity", "allocator", "section", "operation", "dfu", "edge", "function", "workflow", "child", "file", "channel", "unknown", nullptr };

static unsigned matchString(const char * const * names, const char * search, unsigned dft)
{
Expand Down Expand Up @@ -1453,8 +1453,11 @@ unsigned StatsScopeId::getHash() const
switch (scopeType)
{
case SSTfunction:
case SSTunknown:
case SSTdfuworkunit:
case SSTfile:
case SSTsection:
case SSToperation:
case SSTunknown:
return hashcz((const byte *)name.get(), (unsigned)scopeType);
default:
return hashc((const byte *)&id, sizeof(id), (unsigned)scopeType);
Expand Down Expand Up @@ -1502,9 +1505,11 @@ void StatsScopeId::describe(StringBuffer & description) const
case SSTedge:
description.append(' ').append(id).append(',').append(extra);
break;
case SSTfile:
case SSTfunction:
case SSTdfuworkunit:
case SSTfile:
case SSTsection:
case SSToperation:
description.append(' ').append(name);
break;
default:
Expand Down Expand Up @@ -1551,9 +1556,11 @@ void StatsScopeId::deserialize(MemoryBuffer & in, unsigned version)
in.read(id);
in.read(extra);
break;
case SSTfile:
case SSTfunction:
case SSTdfuworkunit:
case SSTfile:
case SSTsection:
case SSToperation:
in.read(name);
break;
default:
Expand All @@ -1579,9 +1586,11 @@ void StatsScopeId::serialize(MemoryBuffer & out) const
out.append(id);
out.append(extra);
break;
case SSTfile:
case SSTfunction:
case SSTdfuworkunit:
case SSTfile:
case SSTsection:
case SSToperation:
out.append(name);
break;
default:
Expand Down

0 comments on commit 1850c53

Please sign in to comment.