July 30, 2023

tChronometerStop – Docs for ESB 7.x

tChronometerStop

Operates as a chronometer device that stops calculating the
processing time of one or more subJobs in the main Job, or that
stops calculating the processing time of part of your subJob. tChronometerStop displays the
total execution time.

Measures the time a subJob takes to be executed.

tChronometerStop Standard properties

These properties are used to configure tChronometerStop running in the Standard Job framework.

The Standard
tChronometerStop component belongs to the Logs & Errors family.

The component in this framework is available in all Talend
products
.

Basic settings

Since options

Select either check box to select measurement starting point:

Since the beginning: stops time
measurement launched at the beginning of a subJob.

Since a tChronometerStart: stops
time measurement launched at one of the tChronometerStart components used on the data flow
of the subJob.

Display duration in console

When selected, it displays subJob execution information on the
console.

Display component name

When selected, it displays the name of the component on the
console.

Caption

Enter desired text, to identify your subJob for example.

Display human readable duration

When selected, it displays subJob execution information in
readable time unites.

Global Variables

Global Variables

STOPTIME: the stop time to calculate the processing time
of subjob(s). This is a Flow variable and it returns a long.

DURATION: the processing time of subjob(s). This is a
Flow variable and it returns a long.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

Cannot be used as a start component.

Measuring the processing time of a subJob and part of a
subJob

This scenario is a subJob that does the following in a sequence:

  • generates 1000 000 rows of first and last names,
  • gathers first names with their corresponding last names,
  • stores the output data in a delimited file,
  • measures the duration of the subJob as a whole,
  • measures the duration of the name replacement operation,
  • displays the gathered information about the processing time on the
    Run log console.

To measure the processing time of the subJob:

  • Drop the following components from the Palette onto the design workspace: tRowGenerator, tMap,
    tFileOutputDelimited, and tChronometerStop.
  • Connect the first three components using Main Row links.
Note: When connecting tMap to
tFileOutputDelimited, you will be prompted to
name the output table. The name used in this example is “new_order”.
tChronometerStop_1.png
  • Connect tFileOutputDelimited
    to tChronometerStop using an OnComponentOk link.
  • Select tRowGenerator and
    click the Component tab to display the
    component view.
  • In the component view, click
    Basic settings. The Component tab opens on the Basic settings view by default.
tChronometerStop_2.png
  • Click Edit schema to define
    the schema of the tRowGenerator. For this
    Job, the schema is composed of two columns: First_Name and Last_Name, so click twice the [+] button to add two columns and rename them.
  • Click the RowGenerator Editor
    three-dot button to open the editor and define the data to be generated.
tChronometerStop_3.png
  • In the RowGenerator Editor,
    specify the number of rows to be generated in the Number
    of Rows for RowGenerator
    field and click OK. The RowGenerator Editor
    closes.
  • You will be prompted to propagate changes. Click Yes in the popup message.
  • Double-click on the tMap
    component to open the Map editor. The Map editor opens displaying the input metadata
    of the tRowGenerator component.
tChronometerStop_4.png
  • In the Schema editor panel of
    the Map editor, click the plus button of the output table to add two rows and define
    them.
  • In the Map editor, drag the First_Name row
    from the input table to the Last_Name row in the output table
    and drag the Last_Name row from the input table to the First_Name row in the output table.
  • Click Apply to save
    changes.
  • You will be prompted to propagate changes. Click Yes in the popup message.
  • Click OK to close the
    editor.
tChronometerStop_5.png
  • Select tFileOutputDelimited
    and click the Component tab to display the
    component view.
  • In the Basic settings view,
    set tFileOutputDelimited properties as
    needed.
tChronometerStop_6.png
  • Select tChronometerStop and
    click the Component tab to display the
    component view.
  • In the Since options panel of
    the Basic settings view, select Since the
    beginning
    option to measure the duration of the subJob as a
    whole.
tChronometerStop_7.png
  • Select/clear the other check boxes as needed. In this scenario, we
    want to display the subJob duration on the console preceded by the component
    name.
  • If needed, enter a text in the Caption field.
  • Save your Job and press F6 to
    execute it.
tChronometerStop_8.png
Note: You can measure the duration of the subJob the same way by placing
tChronometerStop below tRowGenerator, and connecting the latter to tChronometerStop using an OnSubjobOk link.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x