Skip to content

Commit

Permalink
[PLOT_VIEW] Fix several minor issues
Browse files Browse the repository at this point in the history
- The Gantt chart event ID is int32, but in the production use case, we
need int64 to use a thread ID as a plot's event ID. Switch to the
int64_t type.
- FIx of a bug with combining graph names from multiple string parts.

Signed-off-by: Vladyslav Goncharuk <[email protected]>
  • Loading branch information
Vladyslav Goncharuk committed Nov 26, 2024
1 parent 0b72fc9 commit af558aa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dltmessageanalyzerplugin/src/common/PlotDefinitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
typedef double tPlotData;
typedef std::vector<tPlotData> tPlotDataVec;

typedef int tEventId;
typedef int64_t tEventId;

typedef tQStringPtrWrapper tPlotGraphMetadataKey;
typedef tQStringPtrWrapper tPlotGraphMetadataValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ CConsoleInputProcessor::tScenariosMap CConsoleInputProcessor::createScenariosMap

#ifdef DMA_TC_MALLOC_PROFILING_ENABLED
result["dump-memory-stats"] = CConsoleInputProcessor::tScenarioData([](const CConsoleInputProcessor::tParamMap&){dumpMemoryStatistics();}
, "- prints tcmalloc memory stats");
, "- prints tcmalloc memory stats.");
#endif

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ namespace detail
struct tGraphMetadataItem
{
TOptional<QString> graphName;
tMsgId usedMsgId = -1;
};

typedef std::map<tGraphId, tGraphMetadataItem> tGraphIdMetadataMap;
Expand Down Expand Up @@ -1349,7 +1350,12 @@ namespace detail
auto& axisRectNameMap = axisNameMetadataMap[parsingResult.axisRectName].graphIdMetadataMap;
auto& metadataItem = axisRectNameMap[parsingResult.graphId];

metadataItem.graphName.setValue("");
if(!metadataItem.graphName.isSet() || (metadataItem.graphName.isSet() &&
!metadataItem.graphName.getValue().isEmpty() && metadataItem.usedMsgId != msgId ))
{
metadataItem.graphName.setValue("");
metadataItem.usedMsgId = msgId;
}

if(true == parsingResult.graphName.isSet() &&
false == parsingResult.graphName.getValue().isEmpty())
Expand Down Expand Up @@ -1541,7 +1547,7 @@ namespace detail
auto valueStr = getValueFromStringCoverageMap();

bool bValueResolved = false;
auto valueInt = valueStr.toInt(&bValueResolved);
auto valueInt = valueStr.toLongLong(&bValueResolved);

if(false == bValueResolved)
{
Expand Down

0 comments on commit af558aa

Please sign in to comment.