diff --git a/lib/modules/Tools.pmod/Shoot.pmod/AppendMapping2.pike b/lib/modules/Tools.pmod/Shoot.pmod/AppendMapping2.pike new file mode 100644 index 0000000000000000000000000000000000000000..9a3653df50aa1d2962281fe4884327cbd3811b84 --- /dev/null +++ b/lib/modules/Tools.pmod/Shoot.pmod/AppendMapping2.pike @@ -0,0 +1,23 @@ +#pike __REAL_VERSION__ +inherit Tools.Shoot.Test; + +constant name="Append mapping (+)"; + +int k = 600; /* variable to tune the time of the test */ +int m = 2000; /* the target size of the mapping */ +int n = m*k; // for reporting + +void perform() +{ + for (int i=0; i<k; i++) + { + mapping v=([]); + for (int j=0; j<m; j++) + v+=([j:42]); + } +} + +string present_n(int ntot,int nruns,float tseconds,float useconds,int memusage) +{ + return sprintf("%.0f/s",ntot/useconds); +}