code
stringlengths
73
34.1k
label
stringclasses
1 value
static String acquireLock(ZooKeeper zookeeper, String lockNode) throws KeeperException, InterruptedException { // Inspired by the queueing algorithm suggested here: // http://zookeeper.apache.org/doc/trunk/recipes.html#sc_recipes_Queues // Acquire a place in the queue by creating an ephemeral, ...
java
static String takeQueueTicket(ZooKeeper zookeeper, String lockNode) throws InterruptedException, KeeperException { // The ticket number includes a random component to decrease the chances of collision. Collision is handled // neatly, but it saves a few actions if there is no need to retry ticket acquisi...
java
static void releaseTicket(ZooKeeper zookeeper, String lockNode, String ticket) throws KeeperException, InterruptedException { logger.debug("Releasing ticket {}.", ticket); try { zookeeper.delete(lockNode + "/" + ticket, -1); } catch (KeeperException e) { if (...
java
static String waitInLine(ZooKeeper zookeeper, String lockNode, String placeInLine) throws KeeperException, InterruptedException { // Get the list of nodes in the queue, and find out what our position is. List<String> children = zookeeper.getChildren(lockNode, false); // The list re...
java
static boolean grabTicket(ZooKeeper zookeeper, String lockNode, String ticket) throws InterruptedException, KeeperException { try { zookeeper.create(lockNode + "/" + ticket, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL); } catch (KeeperException e) { ...
java
int claimResource(ZooKeeper zookeeper, String poolNode, int poolSize) throws KeeperException, InterruptedException { logger.debug("Trying to claim a resource."); List<String> claimedResources = zookeeper.getChildren(poolNode, false); if (claimedResources.size() >= poolSize) { ...
java
private void relinquishResource(ZooKeeper zookeeper, String poolNode, int resource) { logger.debug("Relinquishing claimed resource {}.", resource); try { zookeeper.delete(poolNode + "/" + Integer.toString(resource), -1); } catch (InterruptedException e) { Thread.currentTh...
java
public static int get(ZooKeeper zookeeper, String znode) throws IOException { try { Stat stat = zookeeper.exists(znode + CLUSTER_ID_NODE, false); if (stat == null) { mkdirp(zookeeper, znode); create(zookeeper, znode + CLUSTER_ID_NODE, String.valueOf(DEFAUL...
java
static List<String> pathParts(String path) { String[] pathParts = path.split("/"); List<String> parts = new ArrayList<>(pathParts.length); String pathSoFar = ""; for (String pathPart : pathParts) { if (!pathPart.equals("")) { pathSoFar += "/" + pathPart; ...
java
public synchronized static IDGenerator generatorFor(int generatorId, int clusterId, Mode mode) { assertParameterWithinBounds("generatorId", 0, Blueprint.MAX_GENERATOR_ID, generatorId); assertParameterWithinBounds("clusterId", 0, Blueprint.MAX_CLUSTER_ID, clusterId); String generatorAndCluster = ...
java
private ZooKeeper connect(String quorumAddresses) throws IOException { final CountDownLatch latch = new CountDownLatch(1); ZooKeeper zookeeper; // Connect to the quorum and wait for the successful connection callback.; zookeeper = new ZooKeeper(quorumAddresses, (int) SECONDS.toMillis(10...
java
byte[] popOne() throws GeneratorException { try { return idStack.pop(); } catch (NoSuchElementException e) { // Cached stack is empty, load up a fresh stack. idStack.addAll(generator.batch(batchSize)); return popOne(); } }
java
public static byte[] build(Blueprint blueprint) { // First 42 bits are the timestamp. // [0] TTTTTTTT [1] TTTTTTTT [2] TTTTTTTT [3] TTTTTTTT [4] TTTTTTTT [5] TT...... ByteBuffer bb = ByteBuffer.allocate(8); switch (blueprint.getMode()) { case SPREAD: long reve...
java
private void ensureAccessible(Key<?> key, GinjectorBindings parent, GinjectorBindings child) { // Parent will be null if it is was an optional dependency and it couldn't be created. if (parent != null && !child.equals(parent) && !child.isBound(key)) { PrettyPrinter.log(logger, TreeLogger.DEBUG, ...
java
public Key<?> getKey(FieldLiteral<?> field) { return getKey(field.getFieldType().getType(), field.getBindingAnnotation()); }
java
private Key<?> getKey(Type type, Annotation bindingAnnotation) throws ProvisionException { if (bindingAnnotation == null) { return Key.get(type); } else { return Key.get(type, bindingAnnotation); } }
java
public Collection<Dependency> getMemberInjectionDependencies( Key<?> typeKey, TypeLiteral<?> type) { Set<Dependency> required = new LinkedHashSet<Dependency>(); for (MethodLiteral<?, Method> method : memberCollector.getMethods(type)) { required.addAll(getDependencies(typeKey, method)); } fo...
java
public Collection<Dependency> getDependencies(Key<?> typeKey, MethodLiteral<?, ?> method) { String context; if (method.isConstructor()) { context = "@Inject constructor of " + method.getDeclaringType(); } else if (typeKey == Dependency.GINJECTOR) { context = "Member injector " + method; } e...
java
public static <T> FieldLiteral<T> get(Field field, TypeLiteral<T> declaringType) { Preconditions.checkArgument( field.getDeclaringClass().equals(declaringType.getRawType()), "declaringType (%s) must be the type literal where field was declared (%s)!", declaringType, field.getDeclaringClass()...
java
public PlayerGuessResult displayNextCard(RelationshipToPreviousCard guess) { Card card = deck.turnCard(); grid.nextCard(card); cardsTurnedPlusOne++; RelationshipToPreviousCard actualRelationshipToPrevious = getRelationshipToPreviousCard(card); previous = card; if (actualRelationshipToPrevious =...
java
protected final <T> GinAnnotatedBindingBuilder<T> bind(Class<T> clazz) { return binder.bind(clazz); }
java
public static boolean isConstantKey(Key<?> key) { Type type = key.getTypeLiteral().getType(); if (!(type instanceof Class)) { return false; } Class clazz = (Class) type; return clazz == String.class || clazz == Class.class || clazz.isPrimitive() || Number.class.isAssignableFrom(clazz...
java
public static void log(TreeLogger logger, TreeLogger.Type type, String formatString, Object... args) { if (logger.isLoggable(type)) { logger.log(type, format(formatString, args)); } }
java
private static Object formatObject(Object object) { if (object instanceof Class) { return formatArg((Class<?>) object); } else if (object instanceof Key) { return formatArg((Key<?>) object); } else if (object instanceof List) { List<?> list = (List<?>) object; // Empirically check if...
java
private String[] extractConstructorParameters(Key<?> factoryKey, TypeLiteral<?> implementation, Constructor constructor, List<Key<?>> methodParams, Errors errors, Set<Dependency> dependencyCollector) throws ErrorsException { // Get parameters with annotations. List<TypeLiteral<?>> ctorParams = impl...
java
public void pruneInvalidOptional(DependencyExplorerOutput output, InvalidKeys invalidKeys) { DependencyGraph.GraphPruner prunedGraph = new DependencyGraph.GraphPruner(output.getGraph()); for (Key<?> key : invalidKeys.getInvalidOptionalKeys()) { prunedGraph.remove(key); output.removeBinding(key); ...
java
private Map<Key<?>, String> getAllInvalidKeys(DependencyExplorerOutput output) { Map<Key<?>, String> invalidKeys = new LinkedHashMap<Key<?>, String>(); // Look for errors in the nodes, and either report the error (if its required) or remove the // node (if its optional). for (Entry<Key<?>, String> ...
java
private Set<Key<?>> getKeysToRemove(DependencyGraph graph, Collection<Key<?>> discovered) { Set<Key<?>> toRemove = new LinkedHashSet<Key<?>>(); while (!discovered.isEmpty()) { toRemove.addAll(discovered); discovered = getRequiredSourcesTargeting(graph, discovered); discovered.removeAll(toRemov...
java
private Collection<Key<?>> getRequiredSourcesTargeting( DependencyGraph graph, Iterable<Key<?>> targets) { Collection<Key<?>> requiredSources = new LinkedHashSet<Key<?>>(); for (Key<?> target : targets) { for (Dependency edge : graph.getDependenciesTargeting(target)) { if (!edge.isOptional()...
java
public Void visitScope(Scope scope) { messages.add(new Message(PrettyPrinter.format("Explicit scope unsupported: key=%s scope=%s", targetKey, scope))); return null; }
java
public static String getUserPackageName(TypeLiteral<?> typeLiteral) { Map<String, Class<?>> packageNames = new LinkedHashMap<String, Class<?>>(); getTypePackageNames(typeLiteral.getType(), packageNames); if (packageNames.size() == 0) { // All type names are public, so typeLiteral is visible from any ...
java
private static void getClassPackageNames(Class<?> clazz, Map<String, Class<?>> packageNames) { if (isPrivate(clazz)) { throw new IllegalArgumentException(PrettyPrinter.format( "Unable to inject an instance of %s because it is a private class.", clazz)); } else if (!isPublic(clazz)) { packa...
java
private static void getParameterizedTypePackageNames(ParameterizedType type, Map<String, Class<?>> packageNames) { for (Type argumentType : type.getActualTypeArguments()) { getTypePackageNames(argumentType, packageNames); } getTypePackageNames(type.getRawType(), packageNames); Type ownerTyp...
java
private static void getTypeVariablePackageNames(TypeVariable type, Map<String, Class<?>> packageNames) { for (Type boundType : type.getBounds()) { getTypePackageNames(boundType, packageNames); } }
java
private static void getWildcardTypePackageNames(WildcardType type, Map<String, Class<?>> packageNames) { for (Type boundType : type.getUpperBounds()) { getTypePackageNames(boundType, packageNames); } for (Type boundType : type.getLowerBounds()) { getTypePackageNames(boundType, packageName...
java
public SourceSnippet getCreationStatements(NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { String moduleSourceName = ReflectUtil.getSourceName(moduleType); String createModule = "new " + moduleSourceName + "()"; String type = ReflectUtil.getSourceName(ta...
java
public String getGetterMethodPackage() { Binding childBinding = childBindings.getBinding(key); if (childBinding == null) { // The child binding should exist before we try to expose it! errorManager.logError("No child binding found in %s for %s.", childBindings, key); return ""; } else { ...
java
public String getGetterMethodPackage() { Binding parentBinding = parentBindings.getBinding(key); if (parentBinding == null) { // The parent binding should exist by the time this is called. errorManager.logError("No parent binding found in %s for %s.", parentBindings, key); return ""; } els...
java
public GinjectorBindings getInstallPosition(Key<?> key) { Preconditions.checkNotNull(positions, "Must call position before calling getInstallPosition(Key<?>)"); GinjectorBindings position = installOverrides.get(key); if (position == null) { position = positions.get(key); } return posit...
java
private void computeInitialPositions() { positions.putAll(output.getPreExistingLocations()); for (Key<?> key : output.getImplicitlyBoundKeys()) { GinjectorBindings initialPosition = computeInitialPosition(key); PrettyPrinter.log(logger, TreeLogger.DEBUG, PrettyPrinter.format( "Initial hig...
java
private GinjectorBindings computeInitialPosition(Key<?> key) { GinjectorBindings initialPosition = output.getGraph().getOrigin(); boolean pinned = initialPosition.isPinned(key); // If the key is pinned (explicitly bound) at the origin, we may be in a situation where we need // to install a binding at t...
java
private boolean canExposeKeyFrom(Key<?> key, GinjectorBindings child, boolean pinned) { GinjectorBindings parent = child.getParent(); if (parent == null) { // Can't move above the root. return false; } else if (parent.isBoundLocallyInChild(key)) { // If a sibling module already materializ...
java
private void calculateExactPositions() { while (!workqueue.isEmpty()) { Key<?> key = workqueue.iterator().next(); workqueue.remove(key); Set<GinjectorBindings> injectors = getSourceGinjectors(key); injectors.add(positions.get(key)); GinjectorBindings newPosition = lowest(injecto...
java
private Set<GinjectorBindings> getSourceGinjectors(Key<?> key) { Set<GinjectorBindings> sourceInjectors = new LinkedHashSet<GinjectorBindings>(); for (Dependency dep : output.getGraph().getDependenciesOf(key)) { sourceInjectors.add(positions.get(dep.getTarget())); } return sourceInjectors; }
java
public static SourceSnippet callChildGetter(final GinjectorBindings childBindings, final Key<?> key) { return new SourceSnippet() { public String getSource(InjectorWriteContext writeContext) { return writeContext.callChildGetter(childBindings, key); } }; }
java
public static SourceSnippet callMethod(final String methodName, final String fragmentPackageName, final Iterable<String> parameters) { return new SourceSnippet() { public String getSource(InjectorWriteContext writeContext) { return writeContext.callMethod(methodName, fragmentPackageName, paramet...
java
public static SourceSnippet callParentGetter(final Key<?> key, final GinjectorBindings parentBindings) { return new SourceSnippet() { public String getSource(InjectorWriteContext writeContext) { return writeContext.callParentGetter(key, parentBindings); } }; }
java
public static SourceSnippet forText(final String text) { return new SourceSnippet() { public String getSource(InjectorWriteContext writeContext) { return text; } }; }
java
public String getFragmentClassName(String injectorClassName, FragmentPackageName fragmentPackageName) { // Sanity check. Preconditions.checkArgument(!injectorClassName.contains("."), "The injector class must be a simple name, but it was \"%s\"", injectorClassName); // Note that the fragment p...
java
public static String replaceLast(String source, char toReplace, char with) { StringBuilder sb = new StringBuilder(source); int index = sb.lastIndexOf(String.valueOf(toReplace)); if (index != -1) { sb.setCharAt(index, with); } return sb.toString(); }
java
public DependencyExplorerOutput explore(GinjectorBindings origin) { DependencyExplorerOutput output = new DependencyExplorerOutput(); DependencyGraph.Builder builder = new DependencyGraph.Builder(origin); for (Dependency edge : origin.getDependencies()) { Preconditions.checkState( Depen...
java
private GinjectorBindings locateHighestAccessibleSource(Key<?> key, GinjectorBindings origin) { // If we don't already have a binding, and the key is "pinned", it means that this injector // is supposed to contain a binding, but it needs to have one created implicitly. We return // null so that we attempt ...
java
public boolean findAndReportCycles(DependencyGraph graph) { this.graph = graph; cycleDetected = false; visitedEdge = new LinkedHashMap<Key<?>, Dependency>(graph.size()); for (Key<?> key : graph.getAllKeys()) { visit(key, null); } return cycleDetected; }
java
static List<Dependency> rootCycleAt(List<Dependency> cycle, Key<?> key) { for (int i = 0; i < cycle.size(); ++i) { if (key.equals(cycle.get(i).getSource())) { List<Dependency> returnValue = new ArrayList<Dependency>(); returnValue.addAll(cycle.subList(i, cycle.size())); returnValue.add...
java
public List<TypeLiteral<?>> getParameterTypes() { if (parameterTypes == null) { parameterTypes = getDeclaringType().getParameterTypes(getMember()); } return parameterTypes; }
java
private ClassLoader createGinClassLoader(TreeLogger logger, GeneratorContext context) { Set<String> exceptions = new LinkedHashSet<String>(); exceptions.add("com.google.inject"); // Need the non-super-source version during generation. exceptions.add("javax.inject"); // Need the non-super-source version duri...
java
Class<?> loadClass(String requestedClass, boolean initialize) throws ClassNotFoundException { String binaryName = requestedClass; while (true) { try { return Class.forName(binaryName, initialize, classLoader); } catch (ClassNotFoundException e) { if (!binaryName.contains(".")) { ...
java
void write(GinjectorBindings bindings) throws UnableToCompleteException { TypeLiteral<?> ginjectorInterface = bindings.getGinjectorInterface(); String implClassName = ginjectorNameGenerator.getClassName(bindings); if (implClassName.contains(".")) { errorManager.logError("Internal error: the injector ...
java
private void outputInterfaceField(GinjectorBindings bindings, SourceWriteUtil sourceWriteUtil, SourceWriter writer) { // Only the root injector has an interface binding. if (bindings.getParent() != null) { return; } Class<?> boundGinjectorInterface = getBoundGinjector(bindings); if (b...
java
private void outputMemberInjections(GinjectorBindings bindings, FragmentMap fragments, SourceWriteUtil sourceWriteUtil) { NameGenerator nameGenerator = bindings.getNameGenerator(); for (TypeLiteral<?> type : bindings.getMemberInjectRequests()) { if (!reachabilityAnalyzer.isReachableMemberInject(bind...
java
void outputStaticInjectionMethods(Class<?> type, FragmentMap fragments, NameGenerator nameGenerator, SourceWriteUtil sourceWriteUtil) { String methodName = nameGenerator.convertToValidMemberName("injectStatic_" + type.getName()); SourceSnippetBuilder body = new SourceSnippetBuilder(); for (InjectionPo...
java
void outputMethods(Iterable<InjectorMethod> methods, FragmentMap fragments) { for (InjectorMethod method : methods) { FragmentPackageName fragmentPackageName = fragmentPackageNameFactory.create(method.getPackageName()); GinjectorFragmentOutputter fragment = fragments.get(fragmentPackageName); ...
java
private static Class<?> getBoundGinjector(GinjectorBindings bindings) { if (bindings.getGinjectorInterface() == null) { return null; } TypeLiteral<?> ginjectorInterface = bindings.getGinjectorInterface(); Key<?> ginjectorKey = Key.get(ginjectorInterface); if (!bindings.isBound(ginjectorKey)...
java
void writeBindingGetter(Key<?> key, Binding binding, GinScope scope, List<InjectorMethod> helperMethodsOutput) { Context bindingContext = binding.getContext(); SourceSnippetBuilder getterBuilder = new SourceSnippetBuilder(); SourceSnippet creationStatements; String getter = nameGenerator.getGette...
java
void commit() { if (committed) { errorManager.logError("Committed the fragment for %s twice.", fragmentPackageName); return; } committed = true; // Write the field where the enclosing injector is stored. writer.beginJavaDocComment(); writer.print("Field for the enclosing injector."...
java
private void registerGinjectorBinding() { Key<? extends Ginjector> ginjectorKey = Key.get(ginjectorInterface); rootGinjectorBindings.addBinding(ginjectorKey, bindingFactory.getGinjectorBinding()); }
java
private void resolveAllUnresolvedBindings(GinjectorBindings collection) throws UnableToCompleteException { // Create known/explicit bindings before descending into children. This ensures that they are // available to any children that may need to depend on them. createBindingsForFactories(collection...
java
public SourceSnippet createFieldInjection(final FieldLiteral<?> field, final String injecteeName, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { final boolean hasInjectee = injecteeName != null; final boolean useNativeMethod = field.isPrivate() ...
java
public void writeBindingContext(SourceWriter writer, Context context) { // Avoid a trailing \n -- the GWT class source file composer will output an // ugly extra newline if we do that. String text = context.toString(); boolean first = true; for (String line : text.split("\n")) { if (first) { ...
java
public void writeBindingContextJavadoc(SourceWriter writer, Context bindingContext, String description) { writer.beginJavaDocComment(); writer.println(description); writeBindingContext(writer, bindingContext); writer.endJavaDocComment(); }
java
public void writeBindingContextJavadoc(SourceWriter writer, Context bindingContext, Key<?> key) { writeBindingContextJavadoc(writer, bindingContext, "Binding for " + key.getTypeLiteral() + " declared at:"); }
java
public void writeMethod(SourceWriter writer, String signature, String body) { writer.println(signature + " {"); writer.indent(); writer.println(body); writer.outdent(); writer.println("}"); writer.println(); }
java
public void writeMethod(InjectorMethod method, SourceWriter writer, InjectorWriteContext writeContext) throws NoSourceNameException { if (method.isNative()) { writeNativeMethod(writer, method.getMethodSignature(), method.getMethodBody(writeContext)); } else { writeMethod(writer, method.getMeth...
java
public void writeMethods(Iterable<InjectorMethod> methods, SourceWriter writer, InjectorWriteContext writeContext) throws NoSourceNameException { for (InjectorMethod method : methods) { writeMethod(method, writer, writeContext); } }
java
public String createMemberInjection(TypeLiteral<?> type, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { String memberInjectMethodName = nameGenerator.getMemberInjectMethodName(type); String memberInjectMethodSignature = "public void " + memberInjectMethodNa...
java
public SourceSnippet createConstructorInjection( MethodLiteral<?, Constructor<?>> constructor, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { return createMethodCallWithInjection(constructor, null, nameGenerator, methodsOutput); }
java
public SourceSnippet createMethodCallWithInjection(MethodLiteral<?, ?> method, String invokeeName, NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException { String[] params = new String[method.getParameterTypes().size()]; return createMethodCallWithInjection(met...
java
private boolean isLongAccess(MethodLiteral<?, ?> method) { boolean result = method.getReturnType().getRawType().equals(Long.TYPE); for (TypeLiteral<?> paramLiteral : method.getParameterTypes()) { result |= paramLiteral.getRawType().equals(Long.TYPE); } return result; }
java
@Override protected Class<?> findClass(String name) throws ClassNotFoundException { if (!loadedClassFiles) { classFileMap = extractClassFileMap(); loadedClassFiles = true; } if (classFileMap == null) { throw new ClassNotFoundException(name); } String internalName = name.replace...
java
public Binding create(Key<?> key) throws BindingCreationException { TypeLiteral<?> type = key.getTypeLiteral(); // All steps per: // http://code.google.com/p/google-guice/wiki/BindingResolution // 1. Explicit binding - already finished at this point. // 2. Ask parent injector. // 3. Ask child...
java
private void traceGinjectorMethods() { TypeLiteral<?> ginjectorInterface = rootBindings.getGinjectorInterface(); for (MethodLiteral<?, Method> method : memberCollector.getMethods(ginjectorInterface)) { if (!guiceUtil.isMemberInject(method)) { // It's a constructor method, so just trace t...
java
private String getNameForType( Class<?> type ) { if ( _typeToStringMap.containsKey( type ) ) { return _typeToStringMap.get( type ); } for ( Entry<String, Class<?>> entry : _typeMappings.entrySet() ) { if ( entry.getValue().isAssignableFrom( type ) ) ...
java
public static ProxyInfo setProxyCfg(String host, String port, String userName, String password) { return new ProxyInfo(host, port, userName, password); }
java
@SuppressWarnings("squid:S134") private void createHtmlReport(FilePath reportFolder, String testFolderPath, File artifactsDir, List<String> reportNames, TestResult testResult) thro...
java
private void createTransactionSummary(FilePath reportFolder, String testFolderPath, File artifactsDir, List<String> reportNames, TestResult testResult) ...
java
private void setProxyCredentials(Run<?, ?> run) { if (proxySettings != null && proxySettings.getFsProxyCredentialsId() != null) { UsernamePasswordCredentials up = CredentialsProvider.findCredentialById( proxySettings.getFsProxyCredentialsId(), StandardUsernamePasswordCredentials.class, ...
java
private UsernamePasswordCredentials getCredentialsById(String credentialsId, Run<?, ?> run, PrintStream logger) { if (StringUtils.isBlank(credentialsId)) { throw new NullPointerException("credentials is not configured."); } UsernamePasswordCredentials credentials = CredentialsProvider.findCre...
java
public void mergeResults(LrJobResults resultFiles) { for(JobLrScenarioResult scenarioResult : resultFiles.getLrScenarioResults().values()) { this._resultFiles.addScenario(scenarioResult); } }
java
public JSONObject loginToMC(String mcUrl, String mcUserName, String mcPassword, String proxyAddress, String proxyUsername, String proxyPassword) { JSONObject returnObject = new JSONObject(); try { Map<String, String> headers = new HashMap<String, String>(); headers.put(Constants...
java
public JSONObject upload(String mcUrl, String mcUserName, String mcPassword, String proxyAddress, String proxyUsername, String proxyPassword, String appPath) throws Exception { JSONObject json = null; String hp4mSecret = null; String jsessionId = null; File appFile = new File(appPath);...
java
public String createTempJob(String mcUrl, String mcUserName, String mcPassword, String proxyAddress, String proxyUserName, String proxyPassword) { JSONObject job = null; String jobId = null; String hp4mSecret = null; String jsessionId = null; String loginJson = loginToMC(mcUrl, ...
java
public JSONObject getJobById(String mcUrl, String mcUserName, String mcPassword, String proxyAddress, String proxyUsername, String proxyPassword, String jobUUID) { JSONObject jobJsonObject = null; String hp4mSecret = null; String jsessionId = null; String loginJson = loginToMC(mcUrl, mc...
java
public List<Result.Suites> getSuites() { if (suites == null) { suites = new ArrayList<Result.Suites>(); } return this.suites; }
java
public MCServerSettingsModel getMCServerSettingsModel() { for (MCServerSettingsModel mcServer : getDescriptor().getMcServers()) { if (this.runFromFileModel != null && runFromFileModel.getMcServerName() != null && mcServer.getMcServerName() != null && runFromFileModel.getMcServerName().equals(mcServe...
java
static void constructPercentileTransactionGraph(Map.Entry<String, LrProjectScenarioResults> scenarioResults, JSONObject scenarioGraphData) { Map<Integer, TreeMap<String, PercentileTransactionWholeRun>> percentileTransactionResults = scenarioRes...
java
static void constructAvgTransactionGraph(Map.Entry<String, LrProjectScenarioResults> scenarioResults, JSONObject scenarioGraphData) { Map<Integer, TreeMap<String, AvgTransactionResponseTime>> avgTransactionResponseTimeResults = scenarioResults.getValu...
java
static void constructErrorGraph(Map.Entry<String, LrProjectScenarioResults> scenarioResults, JSONObject scenarioGraphData) { Map<Integer, TimeRangeResult> errPerSecResults = scenarioResults.getValue().getErrPerSecResults(); JSONObject errPerSecResultsResultsGraphSet =...
java
static void constructAverageThroughput(Map.Entry<String, LrProjectScenarioResults> scenarioResults, JSONObject scenarioGraphData) { Map<Integer, WholeRunResult> averageThroughputResults = scenarioResults.getValue().getAverageThroughputResults(); JSONObject aver...
java
static void constructTotalThroughputGraph(Map.Entry<String, LrProjectScenarioResults> scenarioResults, JSONObject scenarioGraphData) { Map<Integer, WholeRunResult> totalThroughputResults = scenarioResults.getValue().getTotalThroughtputResults(); JSONObject t...
java
static void constructAvgHitsGraph(Map.Entry<String, LrProjectScenarioResults> scenarioResults, JSONObject scenarioGraphData) { Map<Integer, WholeRunResult> avgHitsPerSec = scenarioResults.getValue().getAverageHitsPerSecondResults(); JSONObject avgHitsPerSecGraphSet ...
java