Yicong-Huang opened a new issue, #4892:
URL: https://github.com/apache/texera/issues/4892

   ### Bug Description
   
   `StatisticsManager.get_statistics()` computes `idle_time = 
total_execution_time - data_processing_time - control_processing_time` with no 
clamp. When the data and control processing accumulators overshoot 
`total_execution_time` (e.g. instrumentation skew, or 
`update_total_execution_time` was called before some `increase_*` accumulators 
caught up), `idle_time` becomes a negative integer that propagates to the 
worker statistics protobuf.
   
   File: 
`amber/src/main/python/core/architecture/managers/statistics_manager.py:43-59`
   
   ### Reproduction
   
   \`\`\`python
   from core.architecture.managers.statistics_manager import StatisticsManager
   
   mgr = StatisticsManager()
   mgr.initialize_worker_start_time(1_000)
   mgr.update_total_execution_time(1_100)  # 100 elapsed
   mgr.increase_data_processing_time(80)
   mgr.increase_control_processing_time(50)  # 80 + 50 = 130 > 100
   
   print(mgr.get_statistics().idle_time)  # -30
   \`\`\`
   
   ### Expected Behavior
   
   Either floor `idle_time` at 0 or surface the inconsistency. A negative idle 
component is meaningless to downstream dashboards.
   
   ### Affected Version
   
   1.1.0-incubating


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to