| 242 | } |
| 243 | |
| 244 | std::string JSONTimelineDecoder::GetJSONEntityString(JSONTimelineDecoder::JSONEntity& entity, int& counter) |
| 245 | { |
| 246 | std::string jsonEntityString; |
| 247 | if(entity.GetType() == LAYER) |
| 248 | { |
| 249 | return GetLayerJSONString(entity, counter, jsonEntityString); |
| 250 | } |
| 251 | else if (entity.GetType() == WORKLOAD) |
| 252 | { |
| 253 | return GetWorkloadJSONString(entity, counter, jsonEntityString); |
| 254 | } |
| 255 | else if (entity.GetType() == WORKLOAD_EXECUTION) |
| 256 | { |
| 257 | return GetWorkloadExecutionJSONString(entity, jsonEntityString); |
| 258 | } |
| 259 | else if (entity.GetType() == INFERENCE) |
| 260 | { |
| 261 | return jsonEntityString; |
| 262 | } |
| 263 | else |
| 264 | { |
| 265 | for (uint64_t child_entity_id : entity.childEntities) |
| 266 | { |
| 267 | JSONEntity& childEntity = this->m_Model.jsonEntities.at(child_entity_id); |
| 268 | jsonEntityString.append(GetJSONEntityString(childEntity, ++counter)); |
| 269 | } |
| 270 | return jsonEntityString; |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | std::string JSONTimelineDecoder::GetWorkloadExecutionJSONString(const JSONTimelineDecoder::JSONEntity& entity, |
| 275 | std::string& jsonEntityString) const |