-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d30139c
commit 8c3fab7
Showing
4 changed files
with
254 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef _EFFICIENCY_H | ||
#define _EFFICIENCY_H | ||
// Information for histories of efficient and inefficient worker-count samples | ||
// and for sentinel counts. | ||
typedef uint32_t history_sample_t; | ||
#define HISTORY_LENGTH 32 | ||
#define SENTINEL_COUNT_HISTORY 4 | ||
|
||
typedef struct history_t { | ||
history_sample_t inefficient_history; | ||
history_sample_t efficient_history; | ||
unsigned int sentinel_count_history_tail; | ||
unsigned int recent_sentinel_count; | ||
unsigned int fails; | ||
unsigned int sample_threshold; | ||
unsigned int sentinel_count_history[SENTINEL_COUNT_HISTORY]; | ||
} history_t; | ||
|
||
#endif |
Oops, something went wrong.