| 51 | } |
| 52 | |
| 53 | static double measure(int n_classes, int *out_calls, int *out_resolved) { |
| 54 | int slen = 0; |
| 55 | char *src = build_fixture(n_classes, &slen); |
| 56 | if (!src) |
| 57 | return -1.0; |
| 58 | struct timespec t0, t1; |
| 59 | clock_gettime(CLOCK_MONOTONIC, &t0); |
| 60 | CBMFileResult *r = |
| 61 | cbm_extract_file(src, slen, CBM_LANG_PYTHON, "test", "scale.py", 0, NULL, NULL); |
| 62 | clock_gettime(CLOCK_MONOTONIC, &t1); |
| 63 | double ms = elapsed_ms(t0, t1); |
| 64 | if (out_calls) |
| 65 | *out_calls = r ? r->calls.count : 0; |
| 66 | if (out_resolved) |
| 67 | *out_resolved = r ? r->resolved_calls.count : 0; |
| 68 | if (r) |
| 69 | cbm_free_result(r); |
| 70 | free(src); |
| 71 | return ms; |
| 72 | } |
| 73 | |
| 74 | TEST(pylsp_scale_linear_growth) { |
| 75 | int c100 = 0, r100 = 0; |
no test coverage detected