Skip to content

Provide way to collect start/end read/write time inside the IOs #19381

@kennknowles

Description

@kennknowles

Currently, IO tests measure time using Metrics API but collect start/end time from ParDo transforms that are adjacent to the IO. It's fine for some tests but maybe could be done better. The drawback of the current solution is that we cannot collect time before PBegin and after PDone. Other than that the time we collect now is still not the exact time of read/write start/end but only the time at which first/last record appeared in the DoFn.

See: TimeMonitor.java as an example of such DoFn.

Possible solution: save metrics in startBundle / finishBundle method in IOs whenever a dedicated pipelineOption is set to true. 

In general, maybe it's a good idea to place some other metrics inside IOs too? wdyt?

Imported from Jira BEAM-6969. Original Jira may contain additional context.
Reported by: ŁukaszG.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions