Skip to content

[FEATURE] stats for #runs and runtime for a update for live mode setting update frequency; and show a warning if didn't meet expectation. #267

@badmonster0

Description

@badmonster0

What is the use case?

CocoIndex has a live update mode - https://cocoindex.io/docs/core/flow_methods#live-update
that allows users to configures an interval, and will regularly poll per interval.
https://cocoindex.io/docs/core/flow_def#refresh-interval

For example:https://github.com/cocoindex-io/cocoindex/blob/main/examples/gdrive_text_embedding/main.py#L20

If user set the interval too aggressive, for example i ask it to refresh every 1 sec, but it takes 5 min to process.
underneath: https://docs.rs/tokio/latest/tokio/time/enum.MissedTickBehavior.html

That means: It will only run once in the 5 min duration . In this senario we want to print an message:

# Configured Interval: 1 sec; executed take 5 min, slower than expected frequency per min/hour. 

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    🌈 Triaging

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions