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根据进程号查找其程序文件路径 及 lsof 命令使用

    查找进程文件路径 lsof -p pid 1.列出所有打开的文件: lsof 备注: 如果不加任何参数,就会打开所有被打开的文件,建议加上一下参数来具体定位 2. 查看谁正在使用某个文件 lsof   ...

  2. HashMap的几种遍历方式(转载)

    今天讲解的主要是使用多种方式来实现遍历HashMap取出Key和value,首先在java中如果想让一个集合能够用for增强来实现迭代,那么此接口或类必须实现Iterable接口,那么Iterable ...

  3. 杂项 List

    题目 1. 栈    #A 表达式的转换 (Unaccepted) 2. STL 模板库 #B 双栈排序(Unaccepted)    #C 垃圾陷阱(Accepted)    #D 合并果子(Acc ...

  4. easyui禁止下拉框

    $("#"+vpcid).combobox({disabled: true}); $("#"+vpcid).combobox('setValue',parent ...

  5. 全国地区sql表

    /** * 中国省市区--地区SQL表 */ CREATE TABLE `rc_district` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMEN ...

  6. ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'asfsda1'

    mysql> UPDATE financial_sales_order SET ASSIGN_TIME = '2018-05-02 00:00:00' where CUSTOMER_ID=354 ...

  7. potplayer录制视频包含字幕

    用potplayer录制视频,只能保存视频,外挂字幕的视频字幕无法录制进去 在字幕设置里将几个选项更改,即 字幕输出方式改为直接, 渲染方式不要选矢量即可. 如图:

  8. linux 执行shell文件

    执行的时候总是报错 安装软件: yum install dos2unix chmod +x test.sh dos2unix test.sh 这样执行sh文件不会报一下异常,主要是因为windows中 ...

  9. JS-让浏览器兼容ES6特性

    babel:将 ES6 翻译为 ES5 PS:ie 还不支持 import 和 export 还是用 gulp 打包一下吧

  10. Java常用工具——java多线程

    一.线程的创建 方式一:继承Thread类,重写run()方法 package com.imooc.thread1; class MyThread extends Thread{ public MyT ...