8000 Task visualiser: time values of D3 graph edges don't make sense? · Issue #2620 · spotify/luigi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Task visualiser: time values of D3 graph edges don't make sense? #2620
Closed
@MichaelGrupp

Description

@MichaelGrupp

When using the D3 graph visualization, the time values at the edges don't seem to correspond to the actual duration of that task. The code indicates that it's a duration time.

Here's an example script. It runs a TestTask which wraps 4 DummyTasks that each create a temporary file and sleep for 1 second.

So, running the whole pipeline should take a bit more than 4 seconds in total.

import time

import luigi


class DummyTask(luigi.Task):
    tmp_path = luigi.Parameter()

    def output(self):
        return luigi.LocalTarget(path=self.tmp_path, is_tmp=True)

    def run(self):
        open(self.tmp_path, 'w').write("")
        time.sleep(1)


class TestTask(luigi.WrapperTask):
    def requires(self):
        for path in ["/tmp/a", "/tmp/b", "/tmp/c", "/tmp/d"]:
            yield DummyTask(tmp_path=path)


if __name__ == "__main__":
    luigi.build([TestTask()])

When I run a luigid daemon and then start the script:

time python test.py

time reports a bit more than 4 seconds as expected.

However, the D3 graph in the web viewer shows this:
screenshot from 2019-01-15 18-32-11

To add to the confusion, not even the luigid daemon was running as long as any of the shown times in this example.

Could this be a time conversion bug or am I understanding something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0