ashb edited a comment on issue #5615: [AIRFLOW-5035] Remove 
multiprocessing.Manager in-favour of Pipes
URL: https://github.com/apache/airflow/pull/5615#issuecomment-515052070
 
 
   @milton0825 Are we sure the `dagrun.schedule_delay` stat is right? I'm 
seeing values that don't make sense (2bn!) but I'm not sure yet where the fault 
lies with that metric.
   
   From https://statsd.readthedocs.io/en/v3.2.1/timing.html#timing-chapter
   ```python
   # You must convert to milliseconds:
   dt = int((time.time() - start) * 1000)
   statsd.timing('slept', dt)
   ```
   
   We are doing:
   
   ```
                   expected_start_date = 
dag.following_schedule(dag_run.execution_date)
                   if expected_start_date:
                       schedule_delay = dag_run.start_date - expected_start_date
                       Stats.timing(
                           
'dagrun.schedule_delay.{dag_id}'.format(dag_id=dag.dag_id),
                           schedule_delay)
   
   ```
   
   Which is not an integer MS - unless something is performing an un-documented 
translation layer that metric is wrong.
   
   I think the only timing metric that is right is this one:
   
   ```python
           duration = (timezone.utcnow() - start_dttm).total_seconds() * 1000
           Stats.timing("dagrun.dependency-check.{}".format(self.dag_id), 
duration)
   ```
   
   Reported as https://issues.apache.org/jira/browse/AIRFLOW-5043

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to