} echo "\n"; } function print_info($hostname, $ip, $dmi) { echo "Host info:\n"; echo "\t{$hostname} [IP: {$ip}]\n"; $psk = "/proc/sys/kernel"; if (file_exists("{$psk}/ostype")) { $type = trim(file_get_contents("{$psk}/ostype")); $rel = trim(file_get_contents("{$psk}/osrelease")); $ver = trim(file_get_contents("{$psk}/version")); echo "\t{$type} {$rel} {$ver}\n"; } if (isset($dmi["product_name"])) { $product = $dmi["product_name"]; $vendor = $dmi["vendor"]; echo "\t{$product} by {$vendor}\n"; } echo "\n"; } $hostname = get_hostname(); $ip = get_ip($hostname); $dmi = parse_dmi(); print_info($hostname, $ip, $dmi); $cpu = parse_cpuinfo(); print_cpu($cpu, $dmi); $mem = parse_meminfo(); $swap = parse_swaps(); print_memory($mem, $swap);
$tall = microtime(true); //初始化类 PhpAnalysis::$loadInit = false; $pa = new PhpAnalysis('utf-8', 'utf-8', $pri_dict); print_memory('初始化对象', $memory_info); //载入词典 $pa->LoadDict(); print_memory('载入基本词典', $memory_info); //执行分词 $pa->SetSource($str); $pa->differMax = $do_multi; $pa->unitWord = $do_unit; $pa->StartAnalysis($do_fork); print_memory('执行分词', $memory_info); $okresult = $pa->GetFinallyResult(' ', $do_prop); print_memory('输出分词结果', $memory_info); $pa_foundWordStr = $pa->foundWordStr; $t2 = microtime(true); $endtime = sprintf('%0.4f', $t2 - $t1); $slen = strlen($str); $slen = sprintf('%0.2f', $slen / 1024); $pa = ''; } $teststr = "2010年1月,美国国际消费电子展 (CES)上,联想将展出一款基于ARM架构的新产品,这有可能是传统四大PC厂商首次推出的基于ARM架构的消费电子产品,也意味着在移动互联网和产业融合趋势下,传统的PC芯片霸主英特尔正在遭遇挑战。\n11月12日,联想集团副总裁兼中国区总裁夏立向本报证实,联想基于ARM架构的新产品正在筹备中。\n英特尔新闻发言人孟轶嘉表示,对第三方合作伙伴信息不便评论。\n正面交锋\nARM内部人士透露,11月5日,ARM高级副总裁lanDrew参观了联想研究院,拜访了联想负责消费产品的负责人,进一步商讨基于ARM架构的新产品。ARM是英国芯片设计厂商,全球几乎95%的手机都采用ARM设计的芯片。\n据悉,这是一款采用高通芯片(基于ARM架构)的新产品,高通产品市场总监钱志军表示,联想对此次项目很谨慎,对于产品细节不方便透露。\n夏立告诉记者,联想研究院正在考虑多种方案,此款基于ARM架构的新产品应用邻域多样化,并不是替代传统的PC,而是更丰富的满足用户的需求。目前,客户调研还没有完成,“设计、研发更前瞻一些,最终还要看市场、用户接受程度。”"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>分词测试</title> </head>