Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,7 @@ void* RestrackManualTriggerThread(void *thread_args /* struct ProcDumpConfigurat
#ifdef __linux__
struct ProcDumpConfiguration *config = (struct ProcDumpConfiguration *)thread_args;

struct TerminalState originalTerminalState = {0};
struct TerminalState originalTerminalState = {{}};
auto_free struct CoreDumpWriter *writer = NULL;
std::vector<pthread_t> leakReportThreads;
int rc = 0;
Expand Down
7 changes: 2 additions & 5 deletions tests/integration/ProcDumpTestApplication.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,14 @@ void* ThreadProc(void *input)

// CPU stress function - consumes specified percentage of CPU
void stress_cpu(int target_cpu_percentage) {
struct timespec work_time, sleep_time;
struct timespec sleep_time;
long work_usec, sleep_usec;

// Calculate work and sleep times for desired CPU percentage
// Use 10ms cycle time for good responsiveness
work_usec = (10000 * target_cpu_percentage) / 100;
sleep_usec = 10000 - work_usec;

work_time.tv_sec = work_usec / 1000000;
work_time.tv_nsec = (work_usec % 1000000) * 1000;

sleep_time.tv_sec = sleep_usec / 1000000;
sleep_time.tv_nsec = (sleep_usec % 1000000) * 1000;

Expand Down Expand Up @@ -282,4 +279,4 @@ int main(int argc, char *argv[])
printf("No arguments specified.\n");
exit(1);
}
}
}