NAND_M_PERF_UBIFS_CPU_LOAD source 'common.sh';/opt/ltp/runltp -f ddt/nand_perf_ubifs -s "NAND_S_PERF_UBIFS " -P $PLATFORM -c 8
 
runltp -c
 
in runltp:
 
do  case $arg in
    c)       
            NUM_PROCS=$(($OPTARG))
            if   [ "$NUM_PROCS" -eq 0 ]; then
                # User Did not Define the Value ,or, User Defined Zero,
                # hence, prevent from creating infinite processes
                NUM_PROCS=1
            fi
            $LTPROOT/testcases/bin/genload --cpu $NUM_PROCS >/dev/null 2>&1 &
            GENLOAD=1 ;;
 
 
genload --cpu $NUM_PROCS >/dev/null 2>&1 &
 
-c, --cpu n           spawn n procs spinning on sqrt()\n"
genload in ltp-ddt-backup-servergit\tools\genload
 
->main
else if (strcmp(arg, "--cpu") == 0 || strcmp(arg, "-c") == 0) {
            do_cpu = 1;
            assert_arg("--cpu");
            do_cpu_forks = atoll_b(arg);
 
/* Hog CPU option.  */
    if (do_cpu) {
        out(stdout, "dispatching %lli hogcpu forks\n", do_cpu_forks);

switch (pid = fork()) {
        case 0:    /* child */
            if (do_dryrun)
                exit(0);
            exit(hogcpu(do_cpu_forks));
        case -1:    /* error */
            err(stderr, "hogcpu dispatcher fork failed\n");
            exit(1);
        default:    /* parent */
            children++;
            dbg(stdout, "--> hogcpu dispatcher forked (%i)\n", pid);
        }
    }

 
in hogcpu
 
for (i = 0; forks == 0 || i < forks; i++) {
        switch (pid = fork()) {
        case 0:    /* child */
            alarm(timeout);

/* Use a backoff sleep to ensure we get good fork throughput.  */
            usleep(backoff);

while (1)
                d = sqrt(rand());

/* This case never falls through; alarm signal can cause exit.  */
        case -1:    /* error */
            if (ignore) {
                ++retval;
                wrn(stderr,
                    "hogcpu worker fork failed, continuing\n");
                usleep(retry);
                continue;
            }

err(stderr, "hogcpu worker fork failed\n");
            return 1;
        default:    /* parent */
            dbg(stdout, "--> hogcpu worker forked (%i)\n", pid);
        }
    }

 
 
 
 
 
 
 

ltp-ddt nand_perf_ubifs_w_cpuload的更多相关文章

  1. LTP随笔——本地调用ltp之ltp4j

    关于ltp本地调用的相关参考请见LTP的Git项目:https://github.com/HIT-SCIR 以下以/home/lion/Desktop路径为例下面教程中出现的具体路径以你实际配置的为准 ...

  2. ZH奶酪:自然语言处理工具LTP语言云调用方法

    前言 LTP语言云平台 不支持离线调用: 支持分词.词性标注.命名实体识别.依存句法分析.语义角色标注: 不支持自定义词表,但是你可以先用其他支持自定义分词的工具(例如中科院的NLPIR)把文本进行分 ...

  3. Eclipse DDT

    http://www.eclipse.org/downloads/ https://github.com/DDT-IDE/DDT/blob/latest/documentation/UserGuide ...

  4. ASP.NET中常用的几个李天平开源公共类LTP.Common,Maticsoft.DBUtility,LtpPageControl

    ASP.NET中常用的几个开源公共类: LTP.Common.dll: 通用函数类库     源码下载Maticsoft.DBUtility.dll 数据访问类库组件     源码下载LtpPageC ...

  5. 很好的一篇讲LTP在编解码中的作用的文章

    原文链接 LONG-TERM PREDICTION by: Adit Aviv       Kfir Grichman introduction: The speech signal has been ...

  6. ASP.NET中常用的几个李天平开源公共类LTP.Common,Maticsoft.DBUtility,LtpPageControl (转)

    ASP.NET中常用的几个开源公共类: LTP.Common.dll: 通用函数类库     源码下载Maticsoft.DBUtility.dll 数据访问类库组件     源码下载LtpPageC ...

  7. 编译哈工大语言技术平台云LTP(C++)源码及LTP4J(Java)源码

    转自:编译哈工大语言技术平台云LTP(C++)源码及LTP4J(Java)源码 JDK:java version “1.8.0_31”Java(TM) SE Runtime Environment ( ...

  8. LTP学习

    下载LTP源码和模型文件: https://github.com/linux-test-project/ltp 官方说明文档 http://ltp.readthedocs.org/zh_CN/late ...

  9. LTP 分词算法实践

    参考链接: https://github.com/HIT-SCIR/ltp/blob/master/doc/install.rst http://www.xfyun.cn/index.php/serv ...

随机推荐

  1. linux-Centos 7下bond与vlan技术的结合[推荐]

    https://blog.51cto.com/sf1314/2073519 服务器eth0与eth1作bonding,捆绑成bond0接口,服务器对端交换机端口,同属于100.101号vlan接口 v ...

  2. PHPStorm + Xdebug 调试PHP代码 有大用

    星期四, 12/26/2013 - 19:54 - shipingzhong PHPStorm + Xdebug 调试PHP代码 http://e.v-get.com/2013-11-20 16:55 ...

  3. (转)linux 命令访问url: curl http://www.baidu.com/index.html

    转:https://blog.csdn.net/michael1112/article/details/79119424 1.elinks - lynx-like替代角色模式WWW的浏览器 例如: e ...

  4. JAVA一切皆对象之包装类、自动装箱、自动拆箱

    首先封装一个基本数据类型int, class P{ private int number; //封装一个私有的->基本数据类型 public P(){} public P(int number) ...

  5. 理解JavaScript中的回调函数

    理解回调函数,首先要知道在JavaScript中,函数也是对象,它可以赋值给变量,也可以作为参数传递给另一个函数.比如: var add=function(a,b){ console.log(a+b) ...

  6. day32—CSS多列布局学习

    转行学开发,代码100天——2018-04-17 关于多列布局,前期已经梳理过,今天的培训课程学习中再次提及,趁此也做个总结和检验. 多列布局的介绍参考: day08—css布局解决方案之多列布局   ...

  7. 简单入门爬斗鱼颜值区妹子照片 v1.1

    这是个比较简单的入门爬虫.基于python3. urllib,urllib2,python3中用urllib.request代替,使用方法基本一致. #python3 import urllib.re ...

  8. 【ABAP系列】SAP ABAP-模块 字符串操作基础知识

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[ABAP系列]SAP ABAP-模块 字符串操 ...

  9. K-th Number 【POJ - 2104】【可持久化线段树】

    题目链接 因为这道题没有删除修改之类的,所以很多人会用离散化之后的线段树来做,但是实际上(可能是我懒得去做离散化这个操作了),然后就是直接写可持久化线段树,区间的长度就是int的从最小到最大的长度,然 ...

  10. SEC8 - MySQL 查询语句--------------进阶4:常见的函数

    # 进阶4:常见的函数 /* 概念:将一组逻辑语句封装在方法体中,对外暴露方法名 好处:1.隐藏了实现细节 2.提高代码的复用性 调用: select 函数名() [from 表]; 特点: (1)叫 ...