| 70 | } |
| 71 | |
| 72 | static 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 | |
| 96 | static void fiber_main(ACL_FIBER *fiber acl_unused, void *ctx) |
| 97 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…