Could you implement a way to obtain the cpu and memory usage?

It would be great if one could obtain:
-The general cpu-usage
-The programs cpu-usage
-The ammount of system and free memory
-The ammount of memory the programm uses
-The usage of the current thread (maybe if it is easy to implement)
-And general profiling for exaple for gpu usage or something like that

because these are freqently required in development and one dosn’t want to type a function to handle this all the time. Thats why I think it might be a good Idea to add these or some other profiling options to glfw and I wanted to hear more thoughts on that toppic.

It might also be that these features wont be implemented, because glfw is a window/opengl library and profiling is not its purpose, but I think that these features should exist.

But what are your thaughts?

I’m pretty sure that GLFW should not deal with other OS specific functionality other than creating window & graphics context and processing input events. Just like it does not deal with creating threads or file I/O or network sockets and other OS things. This is why GLFW sometimes is so much better than SDL. It just does one thing and does it good.

People have very different requirements for collecting system info. There are so many options - should it be realtime, or logging to storage (file, network?). Should it be per process or per whole system. Etc… That should be completely different library.

I agree that these should not be part of GLFW, there are lots of different requirements people want and quite a few available libraries out there.

For cross platform detailed profiling libraries, check out Microprofile or Remotery:

There are other libraries out there for CPU usage and memory usage, but I don’t have the links to hand.

Thanks for the links and your opinion!