automatically trigger a profile in your golang (go) application when a condition is matched.
- when process is using certain number of bytes of RAM, save a heap (memory) profile
- when process cpu usage reaches a certain percentage, save a cpu profile.
see the included cpudemo and heapdemo programs, which gradually add more and cpu and heap utilisation, to show the profiletrigger kicking in.