honggfuzz  2.2
About: honggfuzz is a security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with powerful analysis options.
  Fossies Dox: honggfuzz-2.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

performance.c File Reference
#include "libhfuzz/performance.h"
#include <inttypes.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include "honggfuzz.h"
#include "libhfcommon/log.h"
#include "libhfcommon/util.h"
#include "libhfuzz/instrument.h"
Include dependency graph for performance.c:

Go to the source code of this file.

Macros

#define HF_USEC_PER_SEC   1000000
 
#define HF_CHECK_INTERVAL_USECS   (HF_USEC_PER_SEC * 20) /* Peform this check every 20 sec. */
 
#define HF_RESET_RATIO   5 /* Reset ourselves, if currently n times slower than in the beginning */
 

Functions

static bool performanceInit (void)
 
bool performanceTooSlow (void)
 
void performanceCheck (void)
 

Variables

static uint64_t iterCnt = 0
 
static time_t firstInputUSecs = 0
 
static uint64_t initialUSecsPerExec = 0
 
static uint64_t lastCheckUSecs = 0
 
static uint64_t lastCheckIters = 0
 

Macro Definition Documentation

◆ HF_CHECK_INTERVAL_USECS

#define HF_CHECK_INTERVAL_USECS   (HF_USEC_PER_SEC * 20) /* Peform this check every 20 sec. */

Definition at line 17 of file performance.c.

◆ HF_RESET_RATIO

#define HF_RESET_RATIO   5 /* Reset ourselves, if currently n times slower than in the beginning */

Definition at line 18 of file performance.c.

◆ HF_USEC_PER_SEC

#define HF_USEC_PER_SEC   1000000

Definition at line 16 of file performance.c.

Function Documentation

◆ performanceCheck()

void performanceCheck ( void  )

Definition at line 63 of file performance.c.

References iterCnt, performanceInit(), and performanceTooSlow().

Referenced by HonggfuzzPersistentLoop().

◆ performanceInit()

static bool performanceInit ( void  )
static

◆ performanceTooSlow()

bool performanceTooSlow ( void  )

Variable Documentation

◆ firstInputUSecs

time_t firstInputUSecs = 0
static

Definition at line 20 of file performance.c.

Referenced by performanceInit().

◆ initialUSecsPerExec

uint64_t initialUSecsPerExec = 0
static

Definition at line 22 of file performance.c.

Referenced by performanceInit(), and performanceTooSlow().

◆ iterCnt

uint64_t iterCnt = 0
static

Definition at line 19 of file performance.c.

Referenced by performanceCheck(), performanceInit(), and performanceTooSlow().

◆ lastCheckIters

uint64_t lastCheckIters = 0
static

Definition at line 25 of file performance.c.

Referenced by performanceInit(), and performanceTooSlow().

◆ lastCheckUSecs

uint64_t lastCheckUSecs = 0
static

Definition at line 24 of file performance.c.

Referenced by performanceInit(), and performanceTooSlow().