// a very simple workload demonstrating Peak Finder approach // never use this workload for benchmarking Content SimpleContent = { size = exp(13KB); // response sizes distributed exponentially cachable = 80%; // 20% of content is uncachable }; // a primitive server cleverly labeled "S101" // normally, you would specify more properties, // but we will mostly rely on defaults for now Server S = { kind = "S101"; contents = [ SimpleContent ]; direct_access = contents; addresses = ['127.0.0.1:9090' ]; // where to create these server agents }; // a primitive robot Robot R = { kind = "R101"; pop_model = { pop_distr = popUnif(); }; recurrence = 55% / SimpleContent.cachable; // adjusted to get 55% DHR origins = S.addresses; // where the origin servers are addresses = ['127.0.0.1' ]; // where these robot agents will be created req_rate = 500/sec; }; Goal smallSample = { duration = 4sec; }; Goal midSample = { duration = 13sec; }; Phase phase = { name = "finder"; goal.duration = 20min; script = [ every smallSample do { StatSample sample = currentSample(); print("sample mean response time is ", sample.rep.rptm.mean); if (sample.rep.rptm.max > 100msec) then { print("decreasing load factor by -30%"); changeLoadFactorBy(-30%); } else { // print("no reason to decrease load factor"); } } every midSample do { StatSample sample = currentSample(); print("sample mean response time is ", sample.rep.rptm.mean); if (sample.rep.rptm.mean < 50msec) then { print("increasing load factor by 10%"); changeLoadFactorBy(+10%); } } ]; }; schedule(phase); use(S, R);