diff options
| author | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-27 15:09:11 +0000 |
|---|---|---|
| committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-27 15:09:11 +0000 |
| commit | 56bf85096cc89f91d28671b5d93b4172240263bc (patch) | |
| tree | 0574ce9eee45d627f943b80b2445882a762b52af /benchmarks/ubench/files/patch-cpubench.c | |
| parent | 26b078f5434c79c09183a623d0c9897d12fd26c9 (diff) | |
Cleanup patches, category benchmarks
Rename them to follow the make makepatch naming, and regenerate them.
With hat: portmgr
Sponsored by: Absolight
Diffstat (limited to 'benchmarks/ubench/files/patch-cpubench.c')
| -rw-r--r-- | benchmarks/ubench/files/patch-cpubench.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/benchmarks/ubench/files/patch-cpubench.c b/benchmarks/ubench/files/patch-cpubench.c new file mode 100644 index 000000000000..f020598b7378 --- /dev/null +++ b/benchmarks/ubench/files/patch-cpubench.c @@ -0,0 +1,45 @@ +--- cpubench.c.orig 2000-05-29 03:21:13 UTC ++++ cpubench.c +@@ -114,7 +114,7 @@ double cdt; + return i; + } + /*****************************************************************************/ +-int cpubench() ++int cpubench(int cpubench_time) + { + int sv[2],i; + int d=0; +@@ -126,7 +126,7 @@ int cpubench() + return 0; + } + cpu_score=0; +- alarm(CPUBENCH_TIME); ++ alarm(cpubench_time); + switch ( (i=sigsetjmp(env,0xffff)) ) + { + case 0: +@@ -136,7 +136,7 @@ int cpubench() + if ( child ) exit(0); + child_number=0; + close(sv[0]); +- dlt=(double )cpu_score*(double )itim; ++ dlt=(double )cpu_score * CPUBENCH_TIME * (double )itim / cpubench_time; + dlt=dlt/(double )CPUREFSCORE; + cpu_score=dlt; + fprintf(stdout,"Ubench CPU: %8d\n",cpu_score); +@@ -152,13 +152,13 @@ int cpubench() + itim=cpucalibrate(CPUREFTIME); + if ( ONEflag ) + { +- dlt=itim*(double )CPUBENCH_TIME/(double )CPUREFTIME/(double )CPUREFSCORE; ++ dlt=itim*(double )cpubench_time/(double )CPUREFTIME/(double )CPUREFSCORE; + cpu_score=dlt; + fprintf(stdout,"Ubench Single CPU: %8d (%.2fs)\n", + cpu_score,cpuload(itim)); + return cpu_score; + } +- alarm(CPUBENCH_TIME); ++ alarm(cpubench_time); + child_pid[child_number]=fork(); + if ( child_pid[child_number] == -1 ) + { |
