<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sched.h>

#include <ohm/ohm-plugin.h>
#include <ohm/ohm-plugin-debug.h>
#include <ohm/ohm-plugin-log.h>


#define PARAM_ROUNDROBIN "round-robin"
#define PARAM_FIFO       "fifo"
#define PARAM_DISABLED   "disabled"
#define PARAM_FIXED      "fixed"
#define PARAM_DYNAMIC    "dynamic"
#define PARAM_FLAT       "flat"

#ifdef _POSIX_PRIORITY_SCHEDULING


/*
 * scheduling modes
 *
 * Notes:
 *
 * There are four different scheduling modes supported. Disabled and fixed
 * should be self-explanatory. Dynamic mode keeps track of all boost / relax
 * requests and keeps RT-scheduling on as long as the number of boost requests
 * exceeds the number of relax request (ie. more boost requests than relax
 * requests). Flat mode always honours the last boost / relax request.
 *
 * To configure RT scheduling you need to specify a valid mode and a
 * non-zero priority in the configuration file (dvfs.ini). Below are some
 * examples.
 *
 *
 * Enable SCHED_RR scheduling in priority group 4 (ie. chrt -r -p 4) whenever
 * there is at least 1 outstanding boost request (ie. more calls to boost
 * than relax):
 *<commit_msg>Comment grammer fix.<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sched.h>

#include <ohm/ohm-plugin.h>
#include <ohm/ohm-plugin-debug.h>
#include <ohm/ohm-plugin-log.h>


#define PARAM_ROUNDROBIN "round-robin"
#define PARAM_FIFO       "fifo"
#define PARAM_DISABLED   "disabled"
#define PARAM_FIXED      "fixed"
#define PARAM_DYNAMIC    "dynamic"
#define PARAM_FLAT       "flat"

#ifdef _POSIX_PRIORITY_SCHEDULING


/*
 * scheduling modes
 *
 * Notes:
 *
 * There are four different scheduling modes supported. Disabled and fixed
 * should be self-explanatory. Dynamic mode keeps track of all boost / relax
 * requests and keeps RT-scheduling on as long as the number of boost requests
 * exceeds the number of relax request (ie. some boost request has not been
 * cancelled by a relax request). Flat mode always honours the last boost /
 * relax request.
 *
 * To configure RT scheduling you need to specify a valid mode and a
 * non-zero priority in the configuration file (dvfs.ini). Below are some
 * examples.
 *
 *
 * Enable SCHED_RR scheduling in priority group 4 (ie. chrt -r -p 4) whenever
 * there is at least 1 outstanding boost request (ie. more calls to boost
 * than relax):
 *
{'fraction_non_alphanumeric': 0.0926887734718338, 'fraction_numerical': 0.0023971234518577705, 'mean_word_length': 3.8433268858800775, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2534657', 'n_tokens_mistral': 823, 'n_tokens_neox': 792, 'n_words': 305}