# How to correctly calculate sync duration of connector run

**URL:** <https://discuss.elastic.co/t/how-to-correctly-calculate-sync-duration-of-connector-run/368623>\
**Category:** Elasticsearch\
**Tags:** connectors\
**Created:** [October 10, 2024, 11:17am UTC](https://discuss.elastic.co/t/how-to-correctly-calculate-sync-duration-of-connector-run/368623 "2024-10-10T11:17:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankur\_Mathur](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankur_mathur/32/138191_2.png) [@Ankur\_Mathur](https://discuss.elastic.co/u/Ankur_Mathur)\
**Post date:** [October 10, 2024, 11:17am UTC](https://discuss.elastic.co/t/how-to-correctly-calculate-sync-duration-of-connector-run/368623/1 "2024-10-10T11:17:45Z")

</div>

I need some help in calculating sync duration for a connector run. I am trying to measure performance of connector. Here is what I am observing:-

1. My Google Drive connector is running for 5m and 20 seconds and has upserted around 5k documents. Then suddenly sync duration is shown as 25 seconds and upserted document count is shown as 40.
2. Looks like these counter got reset in response of some error. Whenever, such behavior is observed, i see a notice that connector has observed an error.

I need help in knowing what is causing such behavior where counter like sync duration and upserted document count is reduced or reset. Moreover, how can I reliably calculate total sync duration.

---

<div class="post-metadata">

**Author:** ![Artem\_Shelkovnikov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_shelkovnikov/32/134322_2.png) [@Artem\_Shelkovnikov](https://discuss.elastic.co/u/Artem_Shelkovnikov)\
**Post date:** [October 10, 2024, 11:37am UTC](https://discuss.elastic.co/t/how-to-correctly-calculate-sync-duration-of-connector-run/368623/2 "2024-10-10T11:37:54Z")

</div>

Hi @Ankur_Mathur,

Are you using this connector? [Elastic Google Drive connector reference | Enterprise Search documentation [8.15] | Elastic](https://www.elastic.co/guide/en/enterprise-search/current/connectors-google-drive.html)

---

<div class="post-metadata">

**Author:** ![Jedr\_Blaszyk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jedr_blaszyk/32/127637_2.png) [@Jedr\_Blaszyk](https://discuss.elastic.co/u/Jedr_Blaszyk)\
**Post date:** [October 10, 2024, 11:43am UTC](https://discuss.elastic.co/t/how-to-correctly-calculate-sync-duration-of-connector-run/368623/3 "2024-10-10T11:43:47Z")

</div>

Hi @Ankur_Mathur, based on your recent questions, it seems like you’re using the Google Drive connector that Artem mentioned. Does the connector end up in the Error state? Are the subsequent sync "full syncs" or "incremental syncs"?

Any errors during the sync should be surfaced to you in the UI, and the job should be marked as failed. If there are some errors during the sync, sharing some logs would be helpful to troubleshoot this further.
