Lines Matching refs:Operation
31 enum Operation {
43 Operation(int frequency) {
54 // Lock used to notify threads performing Operation.WAIT
59 // the Operation.frequency values. We fill out an Operation[]
61 // Operation[] is shuffled so that there is more random
64 // The simple-minded filling in of Operation[] based on
65 // Operation.frequency below won't have even have close to a
66 // reasonable distribution if the count of Operation
71 for (Operation op : Operation.values()) {
78 // Fill in the Operation[] array for each thread by laying
79 // down references to operation according to their desired
83 Operation[] operations = new Operation[operationsPerThread];
87 for (Operation op : Operation.values()) {
102 // Enable to dump operation counds per thread to make sure its
103 // sane compared to Operation.frequency
106 Operation[] operations = new Operation[operationsPerThread];
107 Map<Operation, Integer> distribution = new HashMap<Operation, Integer>();
108 for (Operation operation : operations) {
109 Integer ops = distribution.get(operation);
115 distribution.put(operation, ops);
118 for (Operation op : Operation.values()) {
125 // ensures that thread that exit due to Operation.EXIT will be
153 // up threads in Operation.WAIT
174 private final Operation[] operations;
180 private ThreadStress(Object lock, int id, Operation[] operations) {
192 Operation operation = operations[nextOperation];
195 + " operation " + nextOperation
196 + " is " + operation);
199 switch (operation) {
258 throw new AssertionError(operation.toString());