rake setup_ai_gateway reports incorrect duration

Problem Statement

This is a regression introduced by #3063 (closed).

While looking into the data in #3063 (comment 2931665378), I noticed the GDK dashboard shows rake setup_ai_gateway taking an average of 9 seconds and p90 of 15 seconds, but the component times add up to 1.67-2 minutes.

Screenshot_2025-12-03_at_3.57.21_PM

Impact

We can't accurately measure setup performance.

Proposal

Fix the duration measurement logic to capture the actual execution time.

Impacted categories

The following categories relate to this issue:

Edited by Nao Hashizume