yse / easy_profiler

Lightweight profiler library for c++
MIT License
2.14k stars 184 forks source link

No connection via network possible #209

Open hmars-t opened 1 year ago

hmars-t commented 1 year ago

When I use the profiler::startListen option and start the program, I always get the error message "Cannot connect to localhost" in the GUI. The profiler::dumpBlocksToFile method, on the other hand, works. Can anyone tell me what the problem is? I'm running Mac OS Ventura 13.4.1 and my code looks something like this.

int main(int argc, char *argv[]) {
    EASY_PROFILER_ENABLE;
    profiler::startListen();

    // work to profile
    EASY_BLOCK("SIMULATION")
    simulation.run();
    EASY_END_BLOCK;

    profiler::dumpBlocksToFile("test_profile.prof");
    profiler::stopListen();
    }

This is the output when I load the file manually. What irritates me a bit is that the listen thread seems to be started, but no time has passed. If anyone has any hints on how to solve this, I'd appreciate it.

Bildschirmfoto 2023-07-23 um 16 03 32