⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 do-run.pl

📁 The Staged Event-Driven Architecture (SEDA) is a new design for building scalable Internet services.
💻 PL
字号:
#!/usr/bin/perl# Do a run for a range of parametersif (($#ARGV != 0) && ($#ARGV != 1)) {  print STDERR "Usage: do-run.pl [-p] <logdir>\n";  print STDERR "Options:\n";  print STDERR "\t-p\tDisplay output directly; do not send to log file\n";  exit -1;}$LOGDIR = shift;if ($LOGDIR eq "-p") {  $DIRECT_OUTPUT = 1;  $LOGDIR = shift;}$SERVER = "mm56";$MINCLIENTS = 256;$MAXCLIENTS = 8192;$MAXNODES = 16;sub calcNodes {  my ($numclients) = shift;  $l = int(log($numclients) / log(2));  if (($l % 2) != 0) {    $nodes = 2 ** (($l-1)/2);    $threads = 2 ** (($l+1)/2);  } else {    $nodes = 2 ** ($l/2);    $threads = 2 ** ($l/2);  }  while ($nodes > $MAXNODES) {    $nodes /= 2;    $threads *= 2;  }  return ($nodes, $threads);}for ($totalclients = $MINCLIENTS; $totalclients <= $MAXCLIENTS; $totalclients *= 2) {  ($nodes, $threads) = &calcNodes($totalclients);  $t = $nodes * $threads;  print STDERR "Target is $totalclients, nodes=$nodes, threads=$threads, total=$t\n";  if ($DIRECT_OUTPUT) {    $opt = "-p";  }  $cmd = "run-client.pl $opt $LOGDIR $SERVER $nodes $threads";  print STDERR "Cmd is $cmd\n";  system($cmd);  print STDERR "Done, sleeping ...\n";  sleep(10);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -