mhansen / ansible-trace

Visualise Ansible execution time across playbooks, tasks, and hosts.
GNU General Public License v3.0
97 stars 3 forks source link

Wrong time compute #23

Open louisquentinjoucla opened 2 years ago

louisquentinjoucla commented 2 years ago

:wave: , To compute the timestamp (in microseconds) we use:

time.time_ns() / 1000  if "time_ns" in time.__dict__ else time.time() * 100000

While the first one does the right conversion, the other one does not as time.time() gives time as second. So we need 10^6 and not 10^5

mhansen commented 2 years ago

Whoops!

On Mon, 27 Jun 2022 at 13:20, Quentin Joucla @.***> wrote:

👋 , To compute the timestamp (in microseconds) we use:

time.time_ns() / 1000 if "time_ns" in time.dict else time.time() * 100000

While the first one does the right conversion, the other one does not as time.time() gives time as second. So we need 10^6 and not 10^5

— Reply to this email directly, view it on GitHub https://github.com/mhansen/ansible-trace/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZYOP545XS5BVN3YGT4GDVREMXXANCNFSM5Z476FAA . You are receiving this because you are subscribed to this thread.Message ID: @.***>