Project: mesos
Issue MESOS-2590: Let the slave control the duration of the perf sampler instead of relying on a sleep command.
Right now, we use a sleep command to control the duration of perf sampling: {noformat} sudo perf stat -a -x, --log-fd 1 --pid 10940 -- sleep 10 {noformat} This causes an additional process (i.e., the sleep process) to be forked and causes troubles for us to terminate the perf sampler once the slave exits (See MESOS-2462). Seems that the additional sleep process is not necessary. The slave can just monitor the duration and send a SIGINT to the perf process when duration elapsed. This will cause the perf process to output the stats and terminate.
Story points: 3