MCPcopy Create free account
hub / github.com/acl-dev/acl / fiber_client

Function fiber_client

lib_fiber/samples-c++/https_client/main.cpp:72–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72static void fiber_client(ACL_FIBER *fiber, void *ctx)
73{
74 const char *addr = (const char *) ctx;
75
76 http_client(fiber, addr);
77
78 --__left_fibers;
79 printf("max_fibers: %d, left: %d\r\n", __max_fibers, __left_fibers);
80
81 if (__left_fibers == 0) {
82 double spent;
83 struct timeval end;
84
85 gettimeofday(&end, NULL);
86 spent = stamp_sub(&end, &__begin);
87
88 printf("fibers: %d, clients: %d, error: %d, count: %lld, "
89 "spent: %.2f, speed: %.2f\r\n", __max_fibers,
90 __total_clients, __total_error_clients,
91 __total_count, spent,
92 (__total_count * 1000) / (spent > 0 ? spent : 1));
93 }
94}
95
96static void fiber_main(ACL_FIBER *fiber acl_unused, void *ctx)
97{

Callers

nothing calls this directly

Calls 3

http_clientFunction · 0.70
gettimeofdayFunction · 0.50
stamp_subFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…