Pergunta de entrevista da empresa ThousandEyes

Title: Periodic task scheduler Importance: Monitoring internal and external systems requires a fixed sample rate in order to perform statistical analysis and correlate data from multiple sources. Description: Implement a periodic task scheduler in C++ (not plain C). The tasks in this scheduler will be network or system probes, possibly with a wide variety of execution times. It should be possible to set a separate execution frequency for each task. These tasks will return one or more "metrics" in the form of decimal values. Store both the raw metric data and some aggregate metrics (such as average, minimum, and maximum) in a SQLite database. The aggregate metrics should be kept up to date for each new data point that you collect. If the program is run multiple times, it should continue where it left off, augmenting the existing data.