View Javadoc
1   package org.apache.commons.statistics.examples.jmh.descriptive.jmh_generated;
2   
3   import java.util.List;
4   import java.util.concurrent.atomic.AtomicInteger;
5   import java.util.Collection;
6   import java.util.ArrayList;
7   import java.util.concurrent.TimeUnit;
8   import org.openjdk.jmh.annotations.CompilerControl;
9   import org.openjdk.jmh.runner.InfraControl;
10  import org.openjdk.jmh.infra.ThreadParams;
11  import org.openjdk.jmh.results.BenchmarkTaskResult;
12  import org.openjdk.jmh.results.Result;
13  import org.openjdk.jmh.results.ThroughputResult;
14  import org.openjdk.jmh.results.AverageTimeResult;
15  import org.openjdk.jmh.results.SampleTimeResult;
16  import org.openjdk.jmh.results.SingleShotResult;
17  import org.openjdk.jmh.util.SampleBuffer;
18  import org.openjdk.jmh.annotations.Mode;
19  import org.openjdk.jmh.annotations.Fork;
20  import org.openjdk.jmh.annotations.Measurement;
21  import org.openjdk.jmh.annotations.Threads;
22  import org.openjdk.jmh.annotations.Warmup;
23  import org.openjdk.jmh.annotations.BenchmarkMode;
24  import org.openjdk.jmh.results.RawResults;
25  import org.openjdk.jmh.results.ResultRole;
26  import java.lang.reflect.Field;
27  import org.openjdk.jmh.infra.BenchmarkParams;
28  import org.openjdk.jmh.infra.IterationParams;
29  import org.openjdk.jmh.infra.Blackhole;
30  import org.openjdk.jmh.infra.Control;
31  import org.openjdk.jmh.results.ScalarResult;
32  import org.openjdk.jmh.results.AggregationPolicy;
33  import org.openjdk.jmh.runner.FailureAssistException;
34  
35  import org.apache.commons.statistics.examples.jmh.descriptive.jmh_generated.MedianPerformance_DataSource_jmhType;
36  import org.apache.commons.statistics.examples.jmh.descriptive.jmh_generated.MedianPerformance_IntFunctionSource_jmhType;
37  import org.apache.commons.statistics.examples.jmh.descriptive.jmh_generated.MedianPerformance_jmhType;
38  public final class MedianPerformance_intMedian_jmhTest {
39  
40      byte p000, p001, p002, p003, p004, p005, p006, p007, p008, p009, p010, p011, p012, p013, p014, p015;
41      byte p016, p017, p018, p019, p020, p021, p022, p023, p024, p025, p026, p027, p028, p029, p030, p031;
42      byte p032, p033, p034, p035, p036, p037, p038, p039, p040, p041, p042, p043, p044, p045, p046, p047;
43      byte p048, p049, p050, p051, p052, p053, p054, p055, p056, p057, p058, p059, p060, p061, p062, p063;
44      byte p064, p065, p066, p067, p068, p069, p070, p071, p072, p073, p074, p075, p076, p077, p078, p079;
45      byte p080, p081, p082, p083, p084, p085, p086, p087, p088, p089, p090, p091, p092, p093, p094, p095;
46      byte p096, p097, p098, p099, p100, p101, p102, p103, p104, p105, p106, p107, p108, p109, p110, p111;
47      byte p112, p113, p114, p115, p116, p117, p118, p119, p120, p121, p122, p123, p124, p125, p126, p127;
48      byte p128, p129, p130, p131, p132, p133, p134, p135, p136, p137, p138, p139, p140, p141, p142, p143;
49      byte p144, p145, p146, p147, p148, p149, p150, p151, p152, p153, p154, p155, p156, p157, p158, p159;
50      byte p160, p161, p162, p163, p164, p165, p166, p167, p168, p169, p170, p171, p172, p173, p174, p175;
51      byte p176, p177, p178, p179, p180, p181, p182, p183, p184, p185, p186, p187, p188, p189, p190, p191;
52      byte p192, p193, p194, p195, p196, p197, p198, p199, p200, p201, p202, p203, p204, p205, p206, p207;
53      byte p208, p209, p210, p211, p212, p213, p214, p215, p216, p217, p218, p219, p220, p221, p222, p223;
54      byte p224, p225, p226, p227, p228, p229, p230, p231, p232, p233, p234, p235, p236, p237, p238, p239;
55      byte p240, p241, p242, p243, p244, p245, p246, p247, p248, p249, p250, p251, p252, p253, p254, p255;
56      int startRndMask;
57      BenchmarkParams benchmarkParams;
58      IterationParams iterationParams;
59      ThreadParams threadParams;
60      Blackhole blackhole;
61      Control notifyControl;
62  
63      public BenchmarkTaskResult intMedian_Throughput(InfraControl control, ThreadParams threadParams) throws Throwable {
64          this.benchmarkParams = control.benchmarkParams;
65          this.iterationParams = control.iterationParams;
66          this.threadParams    = threadParams;
67          this.notifyControl   = control.notifyControl;
68          if (this.blackhole == null) {
69              this.blackhole = new Blackhole("Today's password is swordfish. I understand instantiating Blackholes directly is dangerous.");
70          }
71          if (threadParams.getSubgroupIndex() == 0) {
72              RawResults res = new RawResults();
73              MedianPerformance_jmhType l_medianperformance0_G = _jmh_tryInit_f_medianperformance0_G(control);
74              MedianPerformance_DataSource_jmhType l_datasource2_G = _jmh_tryInit_f_datasource2_G(control);
75              MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G = _jmh_tryInit_f_intfunctionsource1_G(control);
76  
77              control.preSetup();
78              if (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
79                  try {
80                      if (control.isFailing) throw new FailureAssistException();
81                      if (!l_datasource2_G.readyIteration) {
82                          l_datasource2_G.setup();
83                          l_datasource2_G.readyIteration = true;
84                      }
85                  } catch (Throwable t) {
86                      control.isFailing = true;
87                      throw t;
88                  } finally {
89                      MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.set(l_datasource2_G, 0);
90                  }
91              } else {
92                  while (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.get(l_datasource2_G) == 1) {
93                      if (control.isFailing) throw new FailureAssistException();
94                      if (Thread.interrupted()) throw new InterruptedException();
95                  }
96              }
97  
98  
99              control.announceWarmupReady();
100             while (control.warmupShouldWait) {
101                 if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
102                     try {
103                         if (control.isFailing) throw new FailureAssistException();
104                         if (!l_datasource2_G.readyInvocation) {
105                             l_datasource2_G.createOrder();
106                             l_datasource2_G.readyInvocation = true;
107                         }
108                     } catch (Throwable t) {
109                         control.isFailing = true;
110                         throw t;
111                     } finally {
112                         MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
113                     }
114                 } else {
115                     while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
116                         if (control.isFailing) throw new FailureAssistException();
117                         if (Thread.interrupted()) throw new InterruptedException();
118                     }
119                 }
120                 l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
121                 if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
122                     try {
123                         if (control.isFailing) throw new FailureAssistException();
124                         if (l_datasource2_G.readyInvocation) {
125                             l_datasource2_G.readyInvocation = false;
126                         }
127                     } catch (Throwable t) {
128                         control.isFailing = true;
129                         throw t;
130                     } finally {
131                         MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
132                     }
133                 } else {
134                     while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
135                         if (control.isFailing) throw new FailureAssistException();
136                         if (Thread.interrupted()) throw new InterruptedException();
137                     }
138                 }
139                 if (control.shouldYield) Thread.yield();
140                 res.allOps++;
141             }
142 
143             notifyControl.startMeasurement = true;
144             intMedian_thrpt_jmhStub(control, res, benchmarkParams, iterationParams, threadParams, blackhole, notifyControl, startRndMask, l_intfunctionsource1_G, l_datasource2_G, l_medianperformance0_G);
145             notifyControl.stopMeasurement = true;
146             control.announceWarmdownReady();
147             try {
148                 while (control.warmdownShouldWait) {
149                     if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
150                         try {
151                             if (control.isFailing) throw new FailureAssistException();
152                             if (!l_datasource2_G.readyInvocation) {
153                                 l_datasource2_G.createOrder();
154                                 l_datasource2_G.readyInvocation = true;
155                             }
156                         } catch (Throwable t) {
157                             control.isFailing = true;
158                             throw t;
159                         } finally {
160                             MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
161                         }
162                     } else {
163                         while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
164                             if (control.isFailing) throw new FailureAssistException();
165                             if (Thread.interrupted()) throw new InterruptedException();
166                         }
167                     }
168                     l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
169                     if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
170                         try {
171                             if (control.isFailing) throw new FailureAssistException();
172                             if (l_datasource2_G.readyInvocation) {
173                                 l_datasource2_G.readyInvocation = false;
174                             }
175                         } catch (Throwable t) {
176                             control.isFailing = true;
177                             throw t;
178                         } finally {
179                             MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
180                         }
181                     } else {
182                         while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
183                             if (control.isFailing) throw new FailureAssistException();
184                             if (Thread.interrupted()) throw new InterruptedException();
185                         }
186                     }
187                     if (control.shouldYield) Thread.yield();
188                     res.allOps++;
189                 }
190             } catch (Throwable e) {
191                 if (!(e instanceof InterruptedException)) throw e;
192             }
193             control.preTearDown();
194             if (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
195                 try {
196                     if (control.isFailing) throw new FailureAssistException();
197                     if (l_datasource2_G.readyIteration) {
198                         l_datasource2_G.readyIteration = false;
199                     }
200                 } catch (Throwable t) {
201                     control.isFailing = true;
202                     throw t;
203                 } finally {
204                     MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.set(l_datasource2_G, 0);
205                 }
206             } else {
207                 while (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.get(l_datasource2_G) == 1) {
208                     if (control.isFailing) throw new FailureAssistException();
209                     if (Thread.interrupted()) throw new InterruptedException();
210                 }
211             }
212 
213             if (control.isLastIteration()) {
214                 if (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.compareAndSet(l_intfunctionsource1_G, 0, 1)) {
215                     try {
216                         if (control.isFailing) throw new FailureAssistException();
217                         if (l_intfunctionsource1_G.readyTrial) {
218                             l_intfunctionsource1_G.readyTrial = false;
219                         }
220                     } catch (Throwable t) {
221                         control.isFailing = true;
222                         throw t;
223                     } finally {
224                         MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.set(l_intfunctionsource1_G, 0);
225                     }
226                 } else {
227                     long l_intfunctionsource1_G_backoff = 1;
228                     while (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.get(l_intfunctionsource1_G) == 1) {
229                         TimeUnit.MILLISECONDS.sleep(l_intfunctionsource1_G_backoff);
230                         l_intfunctionsource1_G_backoff = Math.max(1024, l_intfunctionsource1_G_backoff * 2);
231                         if (control.isFailing) throw new FailureAssistException();
232                         if (Thread.interrupted()) throw new InterruptedException();
233                     }
234                 }
235                 synchronized(this.getClass()) {
236                     f_intfunctionsource1_G = null;
237                 }
238                 synchronized(this.getClass()) {
239                     f_datasource2_G = null;
240                 }
241                 synchronized(this.getClass()) {
242                     f_medianperformance0_G = null;
243                 }
244             }
245             res.allOps += res.measuredOps;
246             int batchSize = iterationParams.getBatchSize();
247             int opsPerInv = benchmarkParams.getOpsPerInvocation();
248             res.allOps *= opsPerInv;
249             res.allOps /= batchSize;
250             res.measuredOps *= opsPerInv;
251             res.measuredOps /= batchSize;
252             BenchmarkTaskResult results = new BenchmarkTaskResult((long)res.allOps, (long)res.measuredOps);
253             results.add(new ThroughputResult(ResultRole.PRIMARY, "intMedian", res.measuredOps, res.getTime(), benchmarkParams.getTimeUnit()));
254             this.blackhole.evaporate("Yes, I am Stephen Hawking, and know a thing or two about black holes.");
255             return results;
256         } else
257             throw new IllegalStateException("Harness failed to distribute threads among groups properly");
258     }
259 
260     public static void intMedian_thrpt_jmhStub(InfraControl control, RawResults result, BenchmarkParams benchmarkParams, IterationParams iterationParams, ThreadParams threadParams, Blackhole blackhole, Control notifyControl, int startRndMask, MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G, MedianPerformance_DataSource_jmhType l_datasource2_G, MedianPerformance_jmhType l_medianperformance0_G) throws Throwable {
261         long operations = 0;
262         long realTime = 0;
263         result.startTime = System.nanoTime();
264         do {
265             if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
266                 try {
267                     if (control.isFailing) throw new FailureAssistException();
268                     if (!l_datasource2_G.readyInvocation) {
269                         l_datasource2_G.createOrder();
270                         l_datasource2_G.readyInvocation = true;
271                     }
272                 } catch (Throwable t) {
273                     control.isFailing = true;
274                     throw t;
275                 } finally {
276                     MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
277                 }
278             } else {
279                 while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
280                     if (control.isFailing) throw new FailureAssistException();
281                     if (Thread.interrupted()) throw new InterruptedException();
282                 }
283             }
284             long rt = System.nanoTime();
285             l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
286             realTime += (System.nanoTime() - rt);
287             if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
288                 try {
289                     if (control.isFailing) throw new FailureAssistException();
290                     if (l_datasource2_G.readyInvocation) {
291                         l_datasource2_G.readyInvocation = false;
292                     }
293                 } catch (Throwable t) {
294                     control.isFailing = true;
295                     throw t;
296                 } finally {
297                     MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
298                 }
299             } else {
300                 while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
301                     if (control.isFailing) throw new FailureAssistException();
302                     if (Thread.interrupted()) throw new InterruptedException();
303                 }
304             }
305             operations++;
306         } while(!control.isDone);
307         result.stopTime = System.nanoTime();
308         result.realTime = realTime;
309         result.measuredOps = operations;
310     }
311 
312 
313     public BenchmarkTaskResult intMedian_AverageTime(InfraControl control, ThreadParams threadParams) throws Throwable {
314         this.benchmarkParams = control.benchmarkParams;
315         this.iterationParams = control.iterationParams;
316         this.threadParams    = threadParams;
317         this.notifyControl   = control.notifyControl;
318         if (this.blackhole == null) {
319             this.blackhole = new Blackhole("Today's password is swordfish. I understand instantiating Blackholes directly is dangerous.");
320         }
321         if (threadParams.getSubgroupIndex() == 0) {
322             RawResults res = new RawResults();
323             MedianPerformance_jmhType l_medianperformance0_G = _jmh_tryInit_f_medianperformance0_G(control);
324             MedianPerformance_DataSource_jmhType l_datasource2_G = _jmh_tryInit_f_datasource2_G(control);
325             MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G = _jmh_tryInit_f_intfunctionsource1_G(control);
326 
327             control.preSetup();
328             if (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
329                 try {
330                     if (control.isFailing) throw new FailureAssistException();
331                     if (!l_datasource2_G.readyIteration) {
332                         l_datasource2_G.setup();
333                         l_datasource2_G.readyIteration = true;
334                     }
335                 } catch (Throwable t) {
336                     control.isFailing = true;
337                     throw t;
338                 } finally {
339                     MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.set(l_datasource2_G, 0);
340                 }
341             } else {
342                 while (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.get(l_datasource2_G) == 1) {
343                     if (control.isFailing) throw new FailureAssistException();
344                     if (Thread.interrupted()) throw new InterruptedException();
345                 }
346             }
347 
348 
349             control.announceWarmupReady();
350             while (control.warmupShouldWait) {
351                 if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
352                     try {
353                         if (control.isFailing) throw new FailureAssistException();
354                         if (!l_datasource2_G.readyInvocation) {
355                             l_datasource2_G.createOrder();
356                             l_datasource2_G.readyInvocation = true;
357                         }
358                     } catch (Throwable t) {
359                         control.isFailing = true;
360                         throw t;
361                     } finally {
362                         MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
363                     }
364                 } else {
365                     while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
366                         if (control.isFailing) throw new FailureAssistException();
367                         if (Thread.interrupted()) throw new InterruptedException();
368                     }
369                 }
370                 l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
371                 if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
372                     try {
373                         if (control.isFailing) throw new FailureAssistException();
374                         if (l_datasource2_G.readyInvocation) {
375                             l_datasource2_G.readyInvocation = false;
376                         }
377                     } catch (Throwable t) {
378                         control.isFailing = true;
379                         throw t;
380                     } finally {
381                         MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
382                     }
383                 } else {
384                     while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
385                         if (control.isFailing) throw new FailureAssistException();
386                         if (Thread.interrupted()) throw new InterruptedException();
387                     }
388                 }
389                 if (control.shouldYield) Thread.yield();
390                 res.allOps++;
391             }
392 
393             notifyControl.startMeasurement = true;
394             intMedian_avgt_jmhStub(control, res, benchmarkParams, iterationParams, threadParams, blackhole, notifyControl, startRndMask, l_intfunctionsource1_G, l_datasource2_G, l_medianperformance0_G);
395             notifyControl.stopMeasurement = true;
396             control.announceWarmdownReady();
397             try {
398                 while (control.warmdownShouldWait) {
399                     if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
400                         try {
401                             if (control.isFailing) throw new FailureAssistException();
402                             if (!l_datasource2_G.readyInvocation) {
403                                 l_datasource2_G.createOrder();
404                                 l_datasource2_G.readyInvocation = true;
405                             }
406                         } catch (Throwable t) {
407                             control.isFailing = true;
408                             throw t;
409                         } finally {
410                             MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
411                         }
412                     } else {
413                         while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
414                             if (control.isFailing) throw new FailureAssistException();
415                             if (Thread.interrupted()) throw new InterruptedException();
416                         }
417                     }
418                     l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
419                     if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
420                         try {
421                             if (control.isFailing) throw new FailureAssistException();
422                             if (l_datasource2_G.readyInvocation) {
423                                 l_datasource2_G.readyInvocation = false;
424                             }
425                         } catch (Throwable t) {
426                             control.isFailing = true;
427                             throw t;
428                         } finally {
429                             MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
430                         }
431                     } else {
432                         while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
433                             if (control.isFailing) throw new FailureAssistException();
434                             if (Thread.interrupted()) throw new InterruptedException();
435                         }
436                     }
437                     if (control.shouldYield) Thread.yield();
438                     res.allOps++;
439                 }
440             } catch (Throwable e) {
441                 if (!(e instanceof InterruptedException)) throw e;
442             }
443             control.preTearDown();
444             if (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
445                 try {
446                     if (control.isFailing) throw new FailureAssistException();
447                     if (l_datasource2_G.readyIteration) {
448                         l_datasource2_G.readyIteration = false;
449                     }
450                 } catch (Throwable t) {
451                     control.isFailing = true;
452                     throw t;
453                 } finally {
454                     MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.set(l_datasource2_G, 0);
455                 }
456             } else {
457                 while (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.get(l_datasource2_G) == 1) {
458                     if (control.isFailing) throw new FailureAssistException();
459                     if (Thread.interrupted()) throw new InterruptedException();
460                 }
461             }
462 
463             if (control.isLastIteration()) {
464                 if (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.compareAndSet(l_intfunctionsource1_G, 0, 1)) {
465                     try {
466                         if (control.isFailing) throw new FailureAssistException();
467                         if (l_intfunctionsource1_G.readyTrial) {
468                             l_intfunctionsource1_G.readyTrial = false;
469                         }
470                     } catch (Throwable t) {
471                         control.isFailing = true;
472                         throw t;
473                     } finally {
474                         MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.set(l_intfunctionsource1_G, 0);
475                     }
476                 } else {
477                     long l_intfunctionsource1_G_backoff = 1;
478                     while (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.get(l_intfunctionsource1_G) == 1) {
479                         TimeUnit.MILLISECONDS.sleep(l_intfunctionsource1_G_backoff);
480                         l_intfunctionsource1_G_backoff = Math.max(1024, l_intfunctionsource1_G_backoff * 2);
481                         if (control.isFailing) throw new FailureAssistException();
482                         if (Thread.interrupted()) throw new InterruptedException();
483                     }
484                 }
485                 synchronized(this.getClass()) {
486                     f_intfunctionsource1_G = null;
487                 }
488                 synchronized(this.getClass()) {
489                     f_datasource2_G = null;
490                 }
491                 synchronized(this.getClass()) {
492                     f_medianperformance0_G = null;
493                 }
494             }
495             res.allOps += res.measuredOps;
496             int batchSize = iterationParams.getBatchSize();
497             int opsPerInv = benchmarkParams.getOpsPerInvocation();
498             res.allOps *= opsPerInv;
499             res.allOps /= batchSize;
500             res.measuredOps *= opsPerInv;
501             res.measuredOps /= batchSize;
502             BenchmarkTaskResult results = new BenchmarkTaskResult((long)res.allOps, (long)res.measuredOps);
503             results.add(new AverageTimeResult(ResultRole.PRIMARY, "intMedian", res.measuredOps, res.getTime(), benchmarkParams.getTimeUnit()));
504             this.blackhole.evaporate("Yes, I am Stephen Hawking, and know a thing or two about black holes.");
505             return results;
506         } else
507             throw new IllegalStateException("Harness failed to distribute threads among groups properly");
508     }
509 
510     public static void intMedian_avgt_jmhStub(InfraControl control, RawResults result, BenchmarkParams benchmarkParams, IterationParams iterationParams, ThreadParams threadParams, Blackhole blackhole, Control notifyControl, int startRndMask, MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G, MedianPerformance_DataSource_jmhType l_datasource2_G, MedianPerformance_jmhType l_medianperformance0_G) throws Throwable {
511         long operations = 0;
512         long realTime = 0;
513         result.startTime = System.nanoTime();
514         do {
515             if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
516                 try {
517                     if (control.isFailing) throw new FailureAssistException();
518                     if (!l_datasource2_G.readyInvocation) {
519                         l_datasource2_G.createOrder();
520                         l_datasource2_G.readyInvocation = true;
521                     }
522                 } catch (Throwable t) {
523                     control.isFailing = true;
524                     throw t;
525                 } finally {
526                     MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
527                 }
528             } else {
529                 while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
530                     if (control.isFailing) throw new FailureAssistException();
531                     if (Thread.interrupted()) throw new InterruptedException();
532                 }
533             }
534             long rt = System.nanoTime();
535             l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
536             realTime += (System.nanoTime() - rt);
537             if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
538                 try {
539                     if (control.isFailing) throw new FailureAssistException();
540                     if (l_datasource2_G.readyInvocation) {
541                         l_datasource2_G.readyInvocation = false;
542                     }
543                 } catch (Throwable t) {
544                     control.isFailing = true;
545                     throw t;
546                 } finally {
547                     MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
548                 }
549             } else {
550                 while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
551                     if (control.isFailing) throw new FailureAssistException();
552                     if (Thread.interrupted()) throw new InterruptedException();
553                 }
554             }
555             operations++;
556         } while(!control.isDone);
557         result.stopTime = System.nanoTime();
558         result.realTime = realTime;
559         result.measuredOps = operations;
560     }
561 
562 
563     public BenchmarkTaskResult intMedian_SampleTime(InfraControl control, ThreadParams threadParams) throws Throwable {
564         this.benchmarkParams = control.benchmarkParams;
565         this.iterationParams = control.iterationParams;
566         this.threadParams    = threadParams;
567         this.notifyControl   = control.notifyControl;
568         if (this.blackhole == null) {
569             this.blackhole = new Blackhole("Today's password is swordfish. I understand instantiating Blackholes directly is dangerous.");
570         }
571         if (threadParams.getSubgroupIndex() == 0) {
572             RawResults res = new RawResults();
573             MedianPerformance_jmhType l_medianperformance0_G = _jmh_tryInit_f_medianperformance0_G(control);
574             MedianPerformance_DataSource_jmhType l_datasource2_G = _jmh_tryInit_f_datasource2_G(control);
575             MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G = _jmh_tryInit_f_intfunctionsource1_G(control);
576 
577             control.preSetup();
578             if (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
579                 try {
580                     if (control.isFailing) throw new FailureAssistException();
581                     if (!l_datasource2_G.readyIteration) {
582                         l_datasource2_G.setup();
583                         l_datasource2_G.readyIteration = true;
584                     }
585                 } catch (Throwable t) {
586                     control.isFailing = true;
587                     throw t;
588                 } finally {
589                     MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.set(l_datasource2_G, 0);
590                 }
591             } else {
592                 while (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.get(l_datasource2_G) == 1) {
593                     if (control.isFailing) throw new FailureAssistException();
594                     if (Thread.interrupted()) throw new InterruptedException();
595                 }
596             }
597 
598 
599             control.announceWarmupReady();
600             while (control.warmupShouldWait) {
601                 if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
602                     try {
603                         if (control.isFailing) throw new FailureAssistException();
604                         if (!l_datasource2_G.readyInvocation) {
605                             l_datasource2_G.createOrder();
606                             l_datasource2_G.readyInvocation = true;
607                         }
608                     } catch (Throwable t) {
609                         control.isFailing = true;
610                         throw t;
611                     } finally {
612                         MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
613                     }
614                 } else {
615                     while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
616                         if (control.isFailing) throw new FailureAssistException();
617                         if (Thread.interrupted()) throw new InterruptedException();
618                     }
619                 }
620                 l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
621                 if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
622                     try {
623                         if (control.isFailing) throw new FailureAssistException();
624                         if (l_datasource2_G.readyInvocation) {
625                             l_datasource2_G.readyInvocation = false;
626                         }
627                     } catch (Throwable t) {
628                         control.isFailing = true;
629                         throw t;
630                     } finally {
631                         MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
632                     }
633                 } else {
634                     while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
635                         if (control.isFailing) throw new FailureAssistException();
636                         if (Thread.interrupted()) throw new InterruptedException();
637                     }
638                 }
639                 if (control.shouldYield) Thread.yield();
640                 res.allOps++;
641             }
642 
643             notifyControl.startMeasurement = true;
644             int targetSamples = (int) (control.getDuration(TimeUnit.MILLISECONDS) * 20); // at max, 20 timestamps per millisecond
645             int batchSize = iterationParams.getBatchSize();
646             int opsPerInv = benchmarkParams.getOpsPerInvocation();
647             SampleBuffer buffer = new SampleBuffer();
648             intMedian_sample_jmhStub(control, res, benchmarkParams, iterationParams, threadParams, blackhole, notifyControl, startRndMask, buffer, targetSamples, opsPerInv, batchSize, l_intfunctionsource1_G, l_datasource2_G, l_medianperformance0_G);
649             notifyControl.stopMeasurement = true;
650             control.announceWarmdownReady();
651             try {
652                 while (control.warmdownShouldWait) {
653                     if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
654                         try {
655                             if (control.isFailing) throw new FailureAssistException();
656                             if (!l_datasource2_G.readyInvocation) {
657                                 l_datasource2_G.createOrder();
658                                 l_datasource2_G.readyInvocation = true;
659                             }
660                         } catch (Throwable t) {
661                             control.isFailing = true;
662                             throw t;
663                         } finally {
664                             MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
665                         }
666                     } else {
667                         while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
668                             if (control.isFailing) throw new FailureAssistException();
669                             if (Thread.interrupted()) throw new InterruptedException();
670                         }
671                     }
672                     l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
673                     if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
674                         try {
675                             if (control.isFailing) throw new FailureAssistException();
676                             if (l_datasource2_G.readyInvocation) {
677                                 l_datasource2_G.readyInvocation = false;
678                             }
679                         } catch (Throwable t) {
680                             control.isFailing = true;
681                             throw t;
682                         } finally {
683                             MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
684                         }
685                     } else {
686                         while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
687                             if (control.isFailing) throw new FailureAssistException();
688                             if (Thread.interrupted()) throw new InterruptedException();
689                         }
690                     }
691                     if (control.shouldYield) Thread.yield();
692                     res.allOps++;
693                 }
694             } catch (Throwable e) {
695                 if (!(e instanceof InterruptedException)) throw e;
696             }
697             control.preTearDown();
698             if (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
699                 try {
700                     if (control.isFailing) throw new FailureAssistException();
701                     if (l_datasource2_G.readyIteration) {
702                         l_datasource2_G.readyIteration = false;
703                     }
704                 } catch (Throwable t) {
705                     control.isFailing = true;
706                     throw t;
707                 } finally {
708                     MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.set(l_datasource2_G, 0);
709                 }
710             } else {
711                 while (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.get(l_datasource2_G) == 1) {
712                     if (control.isFailing) throw new FailureAssistException();
713                     if (Thread.interrupted()) throw new InterruptedException();
714                 }
715             }
716 
717             if (control.isLastIteration()) {
718                 if (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.compareAndSet(l_intfunctionsource1_G, 0, 1)) {
719                     try {
720                         if (control.isFailing) throw new FailureAssistException();
721                         if (l_intfunctionsource1_G.readyTrial) {
722                             l_intfunctionsource1_G.readyTrial = false;
723                         }
724                     } catch (Throwable t) {
725                         control.isFailing = true;
726                         throw t;
727                     } finally {
728                         MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.set(l_intfunctionsource1_G, 0);
729                     }
730                 } else {
731                     long l_intfunctionsource1_G_backoff = 1;
732                     while (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.get(l_intfunctionsource1_G) == 1) {
733                         TimeUnit.MILLISECONDS.sleep(l_intfunctionsource1_G_backoff);
734                         l_intfunctionsource1_G_backoff = Math.max(1024, l_intfunctionsource1_G_backoff * 2);
735                         if (control.isFailing) throw new FailureAssistException();
736                         if (Thread.interrupted()) throw new InterruptedException();
737                     }
738                 }
739                 synchronized(this.getClass()) {
740                     f_intfunctionsource1_G = null;
741                 }
742                 synchronized(this.getClass()) {
743                     f_datasource2_G = null;
744                 }
745                 synchronized(this.getClass()) {
746                     f_medianperformance0_G = null;
747                 }
748             }
749             res.allOps += res.measuredOps * batchSize;
750             res.allOps *= opsPerInv;
751             res.allOps /= batchSize;
752             res.measuredOps *= opsPerInv;
753             BenchmarkTaskResult results = new BenchmarkTaskResult((long)res.allOps, (long)res.measuredOps);
754             results.add(new SampleTimeResult(ResultRole.PRIMARY, "intMedian", buffer, benchmarkParams.getTimeUnit()));
755             this.blackhole.evaporate("Yes, I am Stephen Hawking, and know a thing or two about black holes.");
756             return results;
757         } else
758             throw new IllegalStateException("Harness failed to distribute threads among groups properly");
759     }
760 
761     public static void intMedian_sample_jmhStub(InfraControl control, RawResults result, BenchmarkParams benchmarkParams, IterationParams iterationParams, ThreadParams threadParams, Blackhole blackhole, Control notifyControl, int startRndMask, SampleBuffer buffer, int targetSamples, long opsPerInv, int batchSize, MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G, MedianPerformance_DataSource_jmhType l_datasource2_G, MedianPerformance_jmhType l_medianperformance0_G) throws Throwable {
762         long realTime = 0;
763         long operations = 0;
764         int rnd = (int)System.nanoTime();
765         int rndMask = startRndMask;
766         long time = 0;
767         int currentStride = 0;
768         do {
769             if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
770                 try {
771                     if (control.isFailing) throw new FailureAssistException();
772                     if (!l_datasource2_G.readyInvocation) {
773                         l_datasource2_G.createOrder();
774                         l_datasource2_G.readyInvocation = true;
775                     }
776                 } catch (Throwable t) {
777                     control.isFailing = true;
778                     throw t;
779                 } finally {
780                     MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
781                 }
782             } else {
783                 while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
784                     if (control.isFailing) throw new FailureAssistException();
785                     if (Thread.interrupted()) throw new InterruptedException();
786                 }
787             }
788             long rt = System.nanoTime();
789             rnd = (rnd * 1664525 + 1013904223);
790             boolean sample = (rnd & rndMask) == 0;
791             if (sample) {
792                 time = System.nanoTime();
793             }
794             for (int b = 0; b < batchSize; b++) {
795                 if (control.volatileSpoiler) return;
796                 l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
797             }
798             if (sample) {
799                 buffer.add((System.nanoTime() - time) / opsPerInv);
800                 if (currentStride++ > targetSamples) {
801                     buffer.half();
802                     currentStride = 0;
803                     rndMask = (rndMask << 1) + 1;
804                 }
805             }
806             realTime += (System.nanoTime() - rt);
807             if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
808                 try {
809                     if (control.isFailing) throw new FailureAssistException();
810                     if (l_datasource2_G.readyInvocation) {
811                         l_datasource2_G.readyInvocation = false;
812                     }
813                 } catch (Throwable t) {
814                     control.isFailing = true;
815                     throw t;
816                 } finally {
817                     MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
818                 }
819             } else {
820                 while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
821                     if (control.isFailing) throw new FailureAssistException();
822                     if (Thread.interrupted()) throw new InterruptedException();
823                 }
824             }
825             operations++;
826         } while(!control.isDone);
827         startRndMask = Math.max(startRndMask, rndMask);
828         result.realTime = realTime;
829         result.measuredOps = operations;
830     }
831 
832 
833     public BenchmarkTaskResult intMedian_SingleShotTime(InfraControl control, ThreadParams threadParams) throws Throwable {
834         this.benchmarkParams = control.benchmarkParams;
835         this.iterationParams = control.iterationParams;
836         this.threadParams    = threadParams;
837         this.notifyControl   = control.notifyControl;
838         if (this.blackhole == null) {
839             this.blackhole = new Blackhole("Today's password is swordfish. I understand instantiating Blackholes directly is dangerous.");
840         }
841         if (threadParams.getSubgroupIndex() == 0) {
842             MedianPerformance_jmhType l_medianperformance0_G = _jmh_tryInit_f_medianperformance0_G(control);
843             MedianPerformance_DataSource_jmhType l_datasource2_G = _jmh_tryInit_f_datasource2_G(control);
844             MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G = _jmh_tryInit_f_intfunctionsource1_G(control);
845 
846             control.preSetup();
847             if (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
848                 try {
849                     if (control.isFailing) throw new FailureAssistException();
850                     if (!l_datasource2_G.readyIteration) {
851                         l_datasource2_G.setup();
852                         l_datasource2_G.readyIteration = true;
853                     }
854                 } catch (Throwable t) {
855                     control.isFailing = true;
856                     throw t;
857                 } finally {
858                     MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.set(l_datasource2_G, 0);
859                 }
860             } else {
861                 while (MedianPerformance_DataSource_jmhType.setupIterationMutexUpdater.get(l_datasource2_G) == 1) {
862                     if (control.isFailing) throw new FailureAssistException();
863                     if (Thread.interrupted()) throw new InterruptedException();
864                 }
865             }
866 
867 
868             notifyControl.startMeasurement = true;
869             RawResults res = new RawResults();
870             int batchSize = iterationParams.getBatchSize();
871             intMedian_ss_jmhStub(control, res, benchmarkParams, iterationParams, threadParams, blackhole, notifyControl, startRndMask, batchSize, l_intfunctionsource1_G, l_datasource2_G, l_medianperformance0_G);
872             control.preTearDown();
873             if (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
874                 try {
875                     if (control.isFailing) throw new FailureAssistException();
876                     if (l_datasource2_G.readyIteration) {
877                         l_datasource2_G.readyIteration = false;
878                     }
879                 } catch (Throwable t) {
880                     control.isFailing = true;
881                     throw t;
882                 } finally {
883                     MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.set(l_datasource2_G, 0);
884                 }
885             } else {
886                 while (MedianPerformance_DataSource_jmhType.tearIterationMutexUpdater.get(l_datasource2_G) == 1) {
887                     if (control.isFailing) throw new FailureAssistException();
888                     if (Thread.interrupted()) throw new InterruptedException();
889                 }
890             }
891 
892             if (control.isLastIteration()) {
893                 if (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.compareAndSet(l_intfunctionsource1_G, 0, 1)) {
894                     try {
895                         if (control.isFailing) throw new FailureAssistException();
896                         if (l_intfunctionsource1_G.readyTrial) {
897                             l_intfunctionsource1_G.readyTrial = false;
898                         }
899                     } catch (Throwable t) {
900                         control.isFailing = true;
901                         throw t;
902                     } finally {
903                         MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.set(l_intfunctionsource1_G, 0);
904                     }
905                 } else {
906                     long l_intfunctionsource1_G_backoff = 1;
907                     while (MedianPerformance_IntFunctionSource_jmhType.tearTrialMutexUpdater.get(l_intfunctionsource1_G) == 1) {
908                         TimeUnit.MILLISECONDS.sleep(l_intfunctionsource1_G_backoff);
909                         l_intfunctionsource1_G_backoff = Math.max(1024, l_intfunctionsource1_G_backoff * 2);
910                         if (control.isFailing) throw new FailureAssistException();
911                         if (Thread.interrupted()) throw new InterruptedException();
912                     }
913                 }
914                 synchronized(this.getClass()) {
915                     f_intfunctionsource1_G = null;
916                 }
917                 synchronized(this.getClass()) {
918                     f_datasource2_G = null;
919                 }
920                 synchronized(this.getClass()) {
921                     f_medianperformance0_G = null;
922                 }
923             }
924             int opsPerInv = control.benchmarkParams.getOpsPerInvocation();
925             long totalOps = opsPerInv;
926             BenchmarkTaskResult results = new BenchmarkTaskResult(totalOps, totalOps);
927             results.add(new SingleShotResult(ResultRole.PRIMARY, "intMedian", res.getTime(), totalOps, benchmarkParams.getTimeUnit()));
928             this.blackhole.evaporate("Yes, I am Stephen Hawking, and know a thing or two about black holes.");
929             return results;
930         } else
931             throw new IllegalStateException("Harness failed to distribute threads among groups properly");
932     }
933 
934     public static void intMedian_ss_jmhStub(InfraControl control, RawResults result, BenchmarkParams benchmarkParams, IterationParams iterationParams, ThreadParams threadParams, Blackhole blackhole, Control notifyControl, int startRndMask, int batchSize, MedianPerformance_IntFunctionSource_jmhType l_intfunctionsource1_G, MedianPerformance_DataSource_jmhType l_datasource2_G, MedianPerformance_jmhType l_medianperformance0_G) throws Throwable {
935         long realTime = 0;
936         result.startTime = System.nanoTime();
937         for (int b = 0; b < batchSize; b++) {
938             if (control.volatileSpoiler) return;
939             if (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
940                 try {
941                     if (control.isFailing) throw new FailureAssistException();
942                     if (!l_datasource2_G.readyInvocation) {
943                         l_datasource2_G.createOrder();
944                         l_datasource2_G.readyInvocation = true;
945                     }
946                 } catch (Throwable t) {
947                     control.isFailing = true;
948                     throw t;
949                 } finally {
950                     MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.set(l_datasource2_G, 0);
951                 }
952             } else {
953                 while (MedianPerformance_DataSource_jmhType.setupInvocationMutexUpdater.get(l_datasource2_G) == 1) {
954                     if (control.isFailing) throw new FailureAssistException();
955                     if (Thread.interrupted()) throw new InterruptedException();
956                 }
957             }
958             long rt = System.nanoTime();
959             l_medianperformance0_G.intMedian(l_intfunctionsource1_G, l_datasource2_G, blackhole);
960             realTime += (System.nanoTime() - rt);
961             if (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.compareAndSet(l_datasource2_G, 0, 1)) {
962                 try {
963                     if (control.isFailing) throw new FailureAssistException();
964                     if (l_datasource2_G.readyInvocation) {
965                         l_datasource2_G.readyInvocation = false;
966                     }
967                 } catch (Throwable t) {
968                     control.isFailing = true;
969                     throw t;
970                 } finally {
971                     MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.set(l_datasource2_G, 0);
972                 }
973             } else {
974                 while (MedianPerformance_DataSource_jmhType.tearInvocationMutexUpdater.get(l_datasource2_G) == 1) {
975                     if (control.isFailing) throw new FailureAssistException();
976                     if (Thread.interrupted()) throw new InterruptedException();
977                 }
978             }
979         }
980         result.stopTime = System.nanoTime();
981         result.realTime = realTime;
982     }
983 
984     
985     static volatile MedianPerformance_DataSource_jmhType f_datasource2_G;
986     
987     MedianPerformance_DataSource_jmhType _jmh_tryInit_f_datasource2_G(InfraControl control) throws Throwable {
988         MedianPerformance_DataSource_jmhType val = f_datasource2_G;
989         if (val != null) {
990             return val;
991         }
992         synchronized(this.getClass()) {
993             try {
994             if (control.isFailing) throw new FailureAssistException();
995             val = f_datasource2_G;
996             if (val != null) {
997                 return val;
998             }
999             val = new MedianPerformance_DataSource_jmhType();
1000             Field f;
1001             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("distribution");
1002             f.setAccessible(true);
1003             f.set(val, control.getParam("distribution"));
1004             f = org.apache.commons.statistics.examples.jmh.descriptive.MedianPerformance.DataSource.class.getDeclaredField("length");
1005             f.setAccessible(true);
1006             f.set(val, Integer.valueOf(control.getParam("length")));
1007             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("modification");
1008             f.setAccessible(true);
1009             f.set(val, control.getParam("modification"));
1010             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("offset");
1011             f.setAccessible(true);
1012             f.set(val, Integer.valueOf(control.getParam("offset")));
1013             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("range");
1014             f.setAccessible(true);
1015             f.set(val, Integer.valueOf(control.getParam("range")));
1016             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("rngSeed");
1017             f.setAccessible(true);
1018             f.set(val, Long.valueOf(control.getParam("rngSeed")));
1019             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("samples");
1020             f.setAccessible(true);
1021             f.set(val, Integer.valueOf(control.getParam("samples")));
1022             f = org.apache.commons.statistics.examples.jmh.descriptive.QuantilePerformance.AbstractDataSource.class.getDeclaredField("seed");
1023             f.setAccessible(true);
1024             f.set(val, Integer.valueOf(control.getParam("seed")));
1025             val.readyTrial = true;
1026             f_datasource2_G = val;
1027             } catch (Throwable t) {
1028                 control.isFailing = true;
1029                 throw t;
1030             }
1031         }
1032         return val;
1033     }
1034     
1035     static volatile MedianPerformance_IntFunctionSource_jmhType f_intfunctionsource1_G;
1036     
1037     MedianPerformance_IntFunctionSource_jmhType _jmh_tryInit_f_intfunctionsource1_G(InfraControl control) throws Throwable {
1038         MedianPerformance_IntFunctionSource_jmhType val = f_intfunctionsource1_G;
1039         if (val != null) {
1040             return val;
1041         }
1042         synchronized(this.getClass()) {
1043             try {
1044             if (control.isFailing) throw new FailureAssistException();
1045             val = f_intfunctionsource1_G;
1046             if (val != null) {
1047                 return val;
1048             }
1049             val = new MedianPerformance_IntFunctionSource_jmhType();
1050             Field f;
1051             f = org.apache.commons.statistics.examples.jmh.descriptive.MedianPerformance.IntFunctionSource.class.getDeclaredField("name");
1052             f.setAccessible(true);
1053             f.set(val, control.getParam("name"));
1054             val.setup();
1055             val.readyTrial = true;
1056             f_intfunctionsource1_G = val;
1057             } catch (Throwable t) {
1058                 control.isFailing = true;
1059                 throw t;
1060             }
1061         }
1062         return val;
1063     }
1064     
1065     static volatile MedianPerformance_jmhType f_medianperformance0_G;
1066     
1067     MedianPerformance_jmhType _jmh_tryInit_f_medianperformance0_G(InfraControl control) throws Throwable {
1068         MedianPerformance_jmhType val = f_medianperformance0_G;
1069         if (val != null) {
1070             return val;
1071         }
1072         synchronized(this.getClass()) {
1073             try {
1074             if (control.isFailing) throw new FailureAssistException();
1075             val = f_medianperformance0_G;
1076             if (val != null) {
1077                 return val;
1078             }
1079             val = new MedianPerformance_jmhType();
1080             val.readyTrial = true;
1081             f_medianperformance0_G = val;
1082             } catch (Throwable t) {
1083                 control.isFailing = true;
1084                 throw t;
1085             }
1086         }
1087         return val;
1088     }
1089 
1090 
1091 }
1092