Skip to content

Simulate delay in workloads #12343

@Wonshtrum

Description

@Wonshtrum

I'm working on simulation integration, and I was wondering if it would be possible to simulate a delay in a workload?
The relevant function to call seems to be:

inline Future<Void> delay(double seconds, TaskPriority taskID = TaskPriority::DefaultDelay) {

But it is not exposed in fdb_c bindings.
I also tried to directly access g_network from the workload, but this symbol is marked local/hidden, so it is unavailable from the shared object.
Is there another way to do something like this?
If not, could we add a binding in fdb_c like:

FDBFuture* fdb_delay(double seconds);

Another solution would be to add a similar function to the FDBWorkloadContext.
Finally, we could add a way to get direct access to g_network from FDBWorkloadContext. While great for some prototyping, it would be very unsafe/unstable, and would only work with C++ workloads compiled in the official docker, and not compatible with the new C API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions