| 41 | #include <math.h> |
| 42 | |
| 43 | double nativeBurnCpu() { |
| 44 | int i = 0; |
| 45 | double result = 0; |
| 46 | |
| 47 | while (i < 100000000) { |
| 48 | i++; |
| 49 | result += sqrt(i); |
| 50 | result += pow(i, sqrt(i)); |
| 51 | } |
| 52 | return result; |
| 53 | } |
| 54 | |
| 55 | void loadProfiler() { |
| 56 | void* lib = dlopen(profiler_lib_path, RTLD_NOW | RTLD_GLOBAL); |