亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? proflfun.c

?? clips源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
   /*******************************************************/   /*      "C" Language Integrated Production System      */   /*                                                     */   /*             CLIPS Version 6.24  06/02/06            */   /*                                                     */   /*         CONSTRUCT PROFILING FUNCTIONS MODULE        */   /*******************************************************//*************************************************************//* Purpose: Contains the code for profiling the amount of    *//*   time spent in constructs and user defined functions.    *//*                                                           *//* Principal Programmer(s):                                  *//*      Gary D. Riley                                        *//*                                                           *//* Contributing Programmer(s):                               *//*                                                           *//* Revision History:                                         *//*      6.23: Modified OutputProfileInfo to allow a before   *//*            and after prefix so that a string buffer does  *//*            not need to be created to contain the entire   *//*            prefix. This allows a buffer overflow problem  *//*            to be corrected. DR0857.                       *//*                                                           *//*      6.24: Renamed BOOLEAN macro type to intBool.         *//*                                                           *//*            Added pragmas to remove compilation warnings.  *//*                                                           *//*            Corrected code to remove run-time program      *//*            compiler warnings.                             *//*                                                           *//*************************************************************/#define _PROFLFUN_SOURCE_#include "setup.h"#if PROFILING_FUNCTIONS#include "argacces.h"#include "classcom.h"#include "dffnxfun.h"#include "envrnmnt.h"#include "extnfunc.h"#include "genrccom.h"#include "genrcfun.h"#include "memalloc.h"#include "msgcom.h"#include "router.h"#include "sysdep.h"#include "proflfun.h"#include <string.h>#define NO_PROFILE      0#define USER_FUNCTIONS  1#define CONSTRUCTS_CODE 2#define OUTPUT_STRING "%-40s %7ld %15.6f  %8.2f%%  %15.6f  %8.2f%%\n"/***************************************//* LOCAL INTERNAL FUNCTION DEFINITIONS *//***************************************/   static intBool                     OutputProfileInfo(void *,char *,struct constructProfileInfo *,                                                        char *,char *,char *,char **);   static void                        OutputUserFunctionsInfo(void *);   static void                        OutputConstructsCodeInfo(void *);#if (! RUN_TIME)   static void                        ProfileClearFunction(void *);#endif/******************************************************//* ConstructProfilingFunctionDefinitions: Initializes *//*   the construct profiling functions.               *//******************************************************/globle void ConstructProfilingFunctionDefinitions(  void *theEnv)  {   struct userDataRecord profileDataInfo = { 0, CreateProfileData, DeleteProfileData };   AllocateEnvironmentData(theEnv,PROFLFUN_DATA,sizeof(struct profileFunctionData),NULL);   memcpy(&ProfileFunctionData(theEnv)->ProfileDataInfo,&profileDataInfo,sizeof(struct userDataRecord));         ProfileFunctionData(theEnv)->LastProfileInfo = NO_PROFILE;   ProfileFunctionData(theEnv)->PercentThreshold = 0.0;   ProfileFunctionData(theEnv)->OutputString = OUTPUT_STRING;#if ! RUN_TIME   EnvDefineFunction2(theEnv,"profile",'v', PTIEF ProfileCommand,"ProfileCommand","11w");   EnvDefineFunction2(theEnv,"profile-info",'v', PTIEF ProfileInfoCommand,"ProfileInfoCommand","01w");   EnvDefineFunction2(theEnv,"profile-reset",'v', PTIEF ProfileResetCommand,"ProfileResetCommand","00");   EnvDefineFunction2(theEnv,"set-profile-percent-threshold",'d',                   PTIEF SetProfilePercentThresholdCommand,                   "SetProfilePercentThresholdCommand","11n");   EnvDefineFunction2(theEnv,"get-profile-percent-threshold",'d',                   PTIEF GetProfilePercentThresholdCommand,                   "GetProfilePercentThresholdCommand","00");                      ProfileFunctionData(theEnv)->ProfileDataID = InstallUserDataRecord(theEnv,&ProfileFunctionData(theEnv)->ProfileDataInfo);      EnvAddClearFunction(theEnv,"profile",ProfileClearFunction,0);#endif  }/**********************************//* CreateProfileData: Allocates a *//*   profile user data structure. *//**********************************/globle void *CreateProfileData(  void *theEnv)  {   struct constructProfileInfo *theInfo;      theInfo = (struct constructProfileInfo *)             genalloc(theEnv,sizeof(struct constructProfileInfo));   theInfo->numberOfEntries = 0;   theInfo->childCall = FALSE;   theInfo->startTime = 0.0;   theInfo->totalSelfTime = 0.0;   theInfo->totalWithChildrenTime = 0.0;      return(theInfo);  }  /**************************************//* DeleteProfileData:          *//**************************************/globle void DeleteProfileData(  void *theEnv,  void *theData)  {   genfree(theEnv,theData,sizeof(struct constructProfileInfo));  }/**************************************//* ProfileCommand: H/L access routine *//*   for the profile command.         *//**************************************/globle void ProfileCommand(  void *theEnv)  {   char *argument;   DATA_OBJECT theValue;   if (EnvArgCountCheck(theEnv,"profile",EXACTLY,1) == -1) return;   if (EnvArgTypeCheck(theEnv,"profile",1,SYMBOL,&theValue) == FALSE) return;   argument = DOToString(theValue);   if (! Profile(theEnv,argument))     {      ExpectedTypeError1(theEnv,"profile",1,"symbol with value constructs, user-functions, or off");      return;     }   return;  }/******************************//* Profile: C access routine  *//*   for the profile command. *//******************************/globle intBool Profile(  void *theEnv,  char *argument)  {   /*======================================================*/   /* If the argument is the symbol "user-functions", then */   /* user-defined functions should be profiled. If the    */   /* argument is the symbol "constructs", then            */   /* deffunctions, generic functions, message-handlers,   */   /* and rule RHS actions are profiled.                   */   /*======================================================*/   if (strcmp(argument,"user-functions") == 0)     {      ProfileFunctionData(theEnv)->ProfileStartTime = gentime();      ProfileFunctionData(theEnv)->ProfileUserFunctions = TRUE;      ProfileFunctionData(theEnv)->ProfileConstructs = FALSE;      ProfileFunctionData(theEnv)->LastProfileInfo = USER_FUNCTIONS;     }   else if (strcmp(argument,"constructs") == 0)     {      ProfileFunctionData(theEnv)->ProfileStartTime = gentime();      ProfileFunctionData(theEnv)->ProfileUserFunctions = FALSE;      ProfileFunctionData(theEnv)->ProfileConstructs = TRUE;      ProfileFunctionData(theEnv)->LastProfileInfo = CONSTRUCTS_CODE;     }   /*======================================================*/   /* Otherwise, if the argument is the symbol "off", then */   /* don't profile constructs and user-defined functions. */   /*======================================================*/   else if (strcmp(argument,"off") == 0)     {      ProfileFunctionData(theEnv)->ProfileEndTime = gentime();      ProfileFunctionData(theEnv)->ProfileTotalTime += (ProfileFunctionData(theEnv)->ProfileEndTime - ProfileFunctionData(theEnv)->ProfileStartTime);      ProfileFunctionData(theEnv)->ProfileUserFunctions = FALSE;      ProfileFunctionData(theEnv)->ProfileConstructs = FALSE;     }   /*=====================================================*/   /* Otherwise, generate an error since the only allowed */   /* arguments are "on" or "off."                        */   /*=====================================================*/   else     { return(FALSE); }   return(TRUE);  }/******************************************//* ProfileInfoCommand: H/L access routine *//*   for the profile-info command.        *//******************************************/globle void ProfileInfoCommand(  void *theEnv)  {   int argCount;   DATA_OBJECT theValue;   char buffer[512];      /*===================================*/   /* The profile-info command expects  */   /* at most a single symbol argument. */   /*===================================*/   if ((argCount = EnvArgCountCheck(theEnv,"profile",NO_MORE_THAN,1)) == -1) return;   /*===========================================*/   /* The first profile-info argument indicates */   /* the field on which sorting is performed.  */   /*===========================================*/   if (argCount == 1)     {      if (EnvArgTypeCheck(theEnv,"profile",1,SYMBOL,&theValue) == FALSE) return;     }   /*==================================*/   /* If code is still being profiled, */   /* update the profile end time.     */   /*==================================*/   if (ProfileFunctionData(theEnv)->ProfileUserFunctions || ProfileFunctionData(theEnv)->ProfileConstructs)     {      ProfileFunctionData(theEnv)->ProfileEndTime = gentime();      ProfileFunctionData(theEnv)->ProfileTotalTime += (ProfileFunctionData(theEnv)->ProfileEndTime - ProfileFunctionData(theEnv)->ProfileStartTime);     }         /*==================================*/   /* Print the profiling information. */   /*==================================*/         if (ProfileFunctionData(theEnv)->LastProfileInfo != NO_PROFILE)     {      gensprintf(buffer,"Profile elapsed time = %g seconds\n",                      ProfileFunctionData(theEnv)->ProfileTotalTime);      EnvPrintRouter(theEnv,WDISPLAY,buffer);      if (ProfileFunctionData(theEnv)->LastProfileInfo == USER_FUNCTIONS)        { EnvPrintRouter(theEnv,WDISPLAY,"Function Name                            "); }      else if (ProfileFunctionData(theEnv)->LastProfileInfo == CONSTRUCTS_CODE)        { EnvPrintRouter(theEnv,WDISPLAY,"Construct Name                           "); }                        EnvPrintRouter(theEnv,WDISPLAY,"Entries         Time           %          Time+Kids     %+Kids\n");      if (ProfileFunctionData(theEnv)->LastProfileInfo == USER_FUNCTIONS)        { EnvPrintRouter(theEnv,WDISPLAY,"-------------                            "); }      else if (ProfileFunctionData(theEnv)->LastProfileInfo == CONSTRUCTS_CODE)        { EnvPrintRouter(theEnv,WDISPLAY,"--------------                           "); }      EnvPrintRouter(theEnv,WDISPLAY,"-------        ------        -----        ---------     ------\n");     }   if (ProfileFunctionData(theEnv)->LastProfileInfo == USER_FUNCTIONS) OutputUserFunctionsInfo(theEnv);   if (ProfileFunctionData(theEnv)->LastProfileInfo == CONSTRUCTS_CODE) OutputConstructsCodeInfo(theEnv);  }/**********************************************//* StartProfile: Initiates bookkeeping needed *//*   to profile a construct or function.      *//**********************************************/globle void StartProfile(  void *theEnv,  struct profileFrameInfo *theFrame,  struct userData **theList,  intBool checkFlag)  {   double startTime, addTime;   struct constructProfileInfo *profileInfo;   if (! checkFlag)     {      theFrame->profileOnExit = FALSE;      return;     }   profileInfo = (struct constructProfileInfo *) FetchUserData(theEnv,ProfileFunctionData(theEnv)->ProfileDataID,theList);                   theFrame->profileOnExit = TRUE;   theFrame->parentCall = FALSE;   startTime = gentime();   theFrame->oldProfileFrame = ProfileFunctionData(theEnv)->ActiveProfileFrame;   if (ProfileFunctionData(theEnv)->ActiveProfileFrame != NULL)     {      addTime = startTime - ProfileFunctionData(theEnv)->ActiveProfileFrame->startTime;      ProfileFunctionData(theEnv)->ActiveProfileFrame->totalSelfTime += addTime;     }   ProfileFunctionData(theEnv)->ActiveProfileFrame = profileInfo;   ProfileFunctionData(theEnv)->ActiveProfileFrame->numberOfEntries++;   ProfileFunctionData(theEnv)->ActiveProfileFrame->startTime = startTime;   if (! ProfileFunctionData(theEnv)->ActiveProfileFrame->childCall)     {      theFrame->parentCall = TRUE;      theFrame->parentStartTime = startTime;      ProfileFunctionData(theEnv)->ActiveProfileFrame->childCall = TRUE;     }  }/*******************************************//* EndProfile: Finishes bookkeeping needed *//*   to profile a construct or function.   *//*******************************************/globle void EndProfile(  void *theEnv,  struct profileFrameInfo *theFrame)  {   double endTime, addTime;   if (! theFrame->profileOnExit) return;   endTime = gentime();   if (theFrame->parentCall)     {      addTime = endTime - theFrame->parentStartTime;      ProfileFunctionData(theEnv)->ActiveProfileFrame->totalWithChildrenTime += addTime;      ProfileFunctionData(theEnv)->ActiveProfileFrame->childCall = FALSE;     }   ProfileFunctionData(theEnv)->ActiveProfileFrame->totalSelfTime += (endTime - ProfileFunctionData(theEnv)->ActiveProfileFrame->startTime);   if (theFrame->oldProfileFrame != NULL)     { theFrame->oldProfileFrame->startTime = endTime; }   ProfileFunctionData(theEnv)->ActiveProfileFrame = theFrame->oldProfileFrame;  }/******************************************//* OutputProfileInfo: Prints out a single *//*   line of profile information.         *//******************************************/static intBool OutputProfileInfo(  void *theEnv,  char *itemName,  struct constructProfileInfo *profileInfo,  char *printPrefixBefore,  char *printPrefix,  char *printPrefixAfter,  char **banner)  {   double percent = 0.0, percentWithKids = 0.0;   char buffer[512];      if (profileInfo == NULL) return(FALSE);      if (profileInfo->numberOfEntries == 0) return(FALSE);   if (ProfileFunctionData(theEnv)->ProfileTotalTime != 0.0)     {      percent = (profileInfo->totalSelfTime * 100.0) / ProfileFunctionData(theEnv)->ProfileTotalTime;      if (percent < 0.005) percent = 0.0;      percentWithKids = (profileInfo->totalWithChildrenTime * 100.0) / ProfileFunctionData(theEnv)->ProfileTotalTime;      if (percentWithKids < 0.005) percentWithKids = 0.0;     }   if (percent < ProfileFunctionData(theEnv)->PercentThreshold) return(FALSE);   if ((banner != NULL) && (*banner != NULL))     {      EnvPrintRouter(theEnv,WDISPLAY,*banner);      *banner = NULL;     }   if (printPrefixBefore != NULL)     { EnvPrintRouter(theEnv,WDISPLAY,printPrefixBefore); }      if (printPrefix != NULL)     { EnvPrintRouter(theEnv,WDISPLAY,printPrefix); }   if (printPrefixAfter != NULL)     { EnvPrintRouter(theEnv,WDISPLAY,printPrefixAfter); }   if (strlen(itemName) >= 40)     {      EnvPrintRouter(theEnv,WDISPLAY,itemName);      EnvPrintRouter(theEnv,WDISPLAY,"\n");      itemName = "";     }   gensprintf(buffer,ProfileFunctionData(theEnv)->OutputString,                        itemName,                        (long) profileInfo->numberOfEntries,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区二区在线观看| 亚洲第一主播视频| 日本成人在线电影网| 国产精品羞羞答答xxdd| 欧美主播一区二区三区| 国产亚洲欧美激情| 日本va欧美va欧美va精品| 91亚洲午夜精品久久久久久| 久久影视一区二区| 精品国产乱码久久久久久图片| 亚洲乱码日产精品bd| 国产精品一区免费视频| 久久国产欧美日韩精品| 一区二区三区四区中文字幕| 男人的天堂久久精品| 91国产成人在线| 日韩一区二区免费电影| 亚洲国产日韩a在线播放性色| 播五月开心婷婷综合| 欧美视频日韩视频在线观看| 不卡视频免费播放| 色综合久久久网| 欧美日韩国产精品成人| 欧美成人女星排名| 国产农村妇女毛片精品久久麻豆| 欧美激情在线看| 亚洲狠狠丁香婷婷综合久久久| 亚洲国产综合人成综合网站| 蜜桃视频在线观看一区| 狠狠色综合日日| www.日韩在线| 91在线你懂得| 欧美色中文字幕| 精品欧美乱码久久久久久1区2区| 国产亚洲综合av| 亚洲色图欧美激情| 日韩精品色哟哟| 国产麻豆成人精品| 92精品国产成人观看免费| 在线亚洲精品福利网址导航| 欧美无砖专区一中文字| 欧美哺乳videos| 亚洲视频精选在线| 美女视频一区在线观看| 成人免费视频一区二区| 欧美日韩日日摸| 久久精品欧美一区二区三区不卡| 一区二区三区中文字幕| 麻豆91免费看| 99精品国产一区二区三区不卡| 精品视频全国免费看| 欧美精品一区二区三区四区| 亚洲欧洲日韩女同| 免费成人av在线播放| av电影天堂一区二区在线观看| 欧美人与性动xxxx| 国产精品久久综合| 日本不卡一区二区| 欧美在线三级电影| aaa国产一区| 欧美va在线播放| 亚洲国产另类av| 成人午夜免费电影| 欧美电影免费观看完整版| 亚洲欧美成aⅴ人在线观看| 久久97超碰国产精品超碰| 91天堂素人约啪| 久久久综合九色合综国产精品| 亚洲第一综合色| 97精品久久久久中文字幕| 精品国产3级a| 日产国产高清一区二区三区| 91亚洲国产成人精品一区二区三| www国产亚洲精品久久麻豆| 亚洲精品免费视频| 丁香啪啪综合成人亚洲小说| 日韩女优电影在线观看| 亚洲第一会所有码转帖| av电影在线观看一区| 国产色一区二区| 蜜臀av一区二区在线免费观看 | 国产福利91精品一区| 欧美日韩一区视频| 国产精品天美传媒沈樵| 老汉av免费一区二区三区| 欧美视频在线一区| 亚洲男人的天堂av| 成人av片在线观看| 国产欧美一区二区三区网站| 国产原创一区二区三区| 日韩精品在线一区| 热久久一区二区| 欧美日韩一级片在线观看| 樱桃国产成人精品视频| 91在线丨porny丨国产| 国产欧美一区二区三区鸳鸯浴| 国产精品99久久久久久久女警| 日韩精品一区二区三区中文不卡 | 激情国产一区二区| 一区二区在线观看不卡| 9i在线看片成人免费| 国产精品免费aⅴ片在线观看| 国内偷窥港台综合视频在线播放| 日韩欧美国产wwwww| 男女男精品网站| 日韩欧美成人激情| 免费精品视频最新在线| 日韩限制级电影在线观看| 亚洲视频一二三| 色婷婷亚洲婷婷| 亚洲激情六月丁香| 欧美电影一区二区| 日本va欧美va精品发布| 日韩免费高清视频| 国模无码大尺度一区二区三区| 精品美女一区二区三区| 国内精品国产三级国产a久久| 久久影院电视剧免费观看| 国产91清纯白嫩初高中在线观看 | 久久久精品一品道一区| 国内精品第一页| 中文欧美字幕免费| 成人av网站在线观看| 中文字幕佐山爱一区二区免费| 91麻豆成人久久精品二区三区| 亚洲视频一区二区在线观看| 欧美这里有精品| 麻豆国产精品官网| 亚洲三级小视频| 欧美日韩亚洲国产综合| 老司机免费视频一区二区三区| 欧美本精品男人aⅴ天堂| 国产二区国产一区在线观看| 综合久久久久综合| 欧美在线一二三四区| 九色porny丨国产精品| 久久久激情视频| 色综合一个色综合| 视频在线观看一区二区三区| 亚洲精品在线一区二区| 99久久精品情趣| 亚洲妇女屁股眼交7| 精品日韩99亚洲| 国产aⅴ综合色| 亚洲国产成人av网| 2020国产成人综合网| 91香蕉视频污| 蜜桃视频在线一区| 自拍偷自拍亚洲精品播放| 色国产精品一区在线观看| 午夜在线成人av| 久久精品一区二区三区四区| 国产一区二区三区久久悠悠色av| 国产精品久久久久久久久免费樱桃| 在线观看日韩av先锋影音电影院| 美女mm1313爽爽久久久蜜臀| 亚洲欧美怡红院| 日韩欧美123| 色婷婷av久久久久久久| 黄页网站大全一区二区| 亚洲视频免费在线| 欧美大肚乱孕交hd孕妇| 国产在线精品一区二区不卡了 | 日韩视频一区二区三区在线播放| 国产福利91精品一区二区三区| 亚洲国产aⅴ天堂久久| 久久综合丝袜日本网| 欧美三级中文字幕在线观看| 国产精品一区二区无线| 亚洲第一精品在线| 日韩一区在线免费观看| 亚洲精品一区二区精华| 欧美伦理电影网| 91小视频在线免费看| 国产精品88av| 久久精品久久综合| 亚洲综合免费观看高清完整版在线| 国产午夜亚洲精品午夜鲁丝片| 91精品欧美久久久久久动漫| 91免费国产在线观看| 国内精品伊人久久久久av影院| 午夜精品福利在线| 亚洲蜜臀av乱码久久精品蜜桃| 久久久www免费人成精品| 制服丝袜亚洲网站| 91久久精品网| 97久久超碰精品国产| 不卡的电视剧免费网站有什么| 久久99精品国产| 美日韩一级片在线观看| 亚洲国产精品视频| 一区二区三区不卡视频| 中文乱码免费一区二区| 久久久久久久综合狠狠综合| 日韩亚洲电影在线| 欧美日韩在线播放一区| 一本到不卡免费一区二区| 成人黄色777网| 成人永久aaa| 丁香激情综合国产|