Cong
Cong

Reputation: 479

How to measure total execution time in Nifi

There are many dataflow which include many flowflies,and i want to measure their total execution time.What can i do? enter image description here Any help is appreciate!!!

Upvotes: 3

Views: 1876

Answers (2)

Lamanus
Lamanus

Reputation: 13551

By using UpdateAttribute processor with the Ni-Fi function now as the documentation, set the attribute the starttime to ${now()} and at the final of the code, again update the attribute such as:

timediff  ${now():minus(${starttime}):format("HH:mm")}

where the code will give you the time difference in a format of hours:minutes to the attribute timediff. Then you can print or save or what you want to do with this attribute.

Upvotes: 5

bp2010
bp2010

Reputation: 2472

You can get this information from the logs. If you set the Bulletin Level of the processors you want to monitor to DEBUG level, for example the GET and PUT processors:

enter image description here

You will then see debug log messages from each processor you configure, and you can get the time spent from this.

Upvotes: 0

Related Questions