Maximum size of the async send queue.

@param dsn Sentry server DSN which may contain options.
@return Maximum size of the async send queue.
484159
protected int getAsyncQueueSize(Dsn dsn) {
        return Util.parseInteger(Lookup.lookup(ASYNC_QUEUE_SIZE_OPTION, dsn), QUEUE_SIZE_DEFAULT);
    }
1026673
public long size() {
    long res = 0;
    if (_network!=null) res+=_network.length;
    if (_modelparams!=null) res+=_modelparams.length;
    return res;
  }
1077919
def queue_size(self):
        
        response = self._request("tasks/list")
        tasks = json.loads(response.content.decode('utf-8'))["tasks"]

        return len([t for t in tasks if t['status'] == 'pending'])
534932
public void setLimits(int maxConPerRoute, int maxConTotal) {
        this.maxConnPerRoute = maxConPerRoute;
        this.maxConnTotal = maxConTotal;
        if ( asyncHttpClient != null ) {
            try {
                asyncHttpClient.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
            asyncHttpClient = null;
        }
    }
143250
public int max_number_of_frames(int streamsize)  // E.B
	{
		if (h_vbr == true) return h_vbr_frames;
		else
		{
			if ((framesize + 4 - h_padding_bit) == 0) return 0;
			else return(streamsize / (framesize + 4 - h_padding_bit));
		}
	}
1366671
private static void doWork() {
    derivedLongGauge.createTimeSeries(
        labelValues,
        blockingQueue,
        new ToLongFunction<LinkedBlockingQueue>() {
          @Override
          public long applyAsLong(LinkedBlockingQueue queue) {
            return queue.size();
          }
        });

    // Your code here.
  }
719019
public long size(Transaction transaction)
                    throws ObjectManagerException
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass,
                        "size",
                        new Object[] { transaction });

        long listLength; // For return;

        synchronized (this) {
            synchronized (availableSizeLock) {
                listLength = availableSize;
            } // synchronized (availableSizeLock).

            if (transaction != null) {
                Token nextToken = head;
                // Add links ToBeAdded within the transaction.
                while (nextToken != null) {
                    Link nextLink = (Link) nextToken.getManagedObject();
                    if (nextLink.state == Link.stateToBeAdded
                        && nextLink.lockedBy(transaction))
                        listLength++;
                    nextToken = nextLink.next;
                } // while (nextToken != null).
            } // if (transaction != null)
        } // synchronized (this).

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass,
                       "size",
                       "returns listLength=" + listLength + "(long)");
        return listLength;
    }
934078
private int getMaxStructSize() {
		final int leafSize = (createLeafNode().getStructMaxSize());
		final int internalSize = (createInternalNode().getStructMaxSize());
		return Math.max(leafSize, internalSize);
	}
727458
static Map<String, Object> sizePayload(final Object min, final Object max) {
		if (min == null || max == null) {
			return null;
		}
		Map<String, Object> payload = new LinkedHashMap<>();
		payload.put("min", min);
		payload.put("max", max);
		payload.put("message", MSG_PREFIX + VALIDATORS.get(Size.class));
		return payload;
	}
1073206
protected Marshaller createMarshaller(Dsn dsn) {
        int maxMessageLength = getMaxMessageLength(dsn);
        JsonMarshaller marshaller = createJsonMarshaller(maxMessageLength);

        // Set JSON marshaller bindings
        StackTraceInterfaceBinding stackTraceBinding = new StackTraceInterfaceBinding();
        // Enable common frames hiding unless its value is 'false'.
        stackTraceBinding.setRemoveCommonFramesWithEnclosing(getHideCommonFramesEnabled(dsn));
        stackTraceBinding.setInAppFrames(getInAppFrames(dsn));

        marshaller.addInterfaceBinding(StackTraceInterface.class, stackTraceBinding);
        marshaller.addInterfaceBinding(ExceptionInterface.class, new ExceptionInterfaceBinding(stackTraceBinding));
        marshaller.addInterfaceBinding(MessageInterface.class, new MessageInterfaceBinding(maxMessageLength));
        marshaller.addInterfaceBinding(UserInterface.class, new UserInterfaceBinding());
        marshaller.addInterfaceBinding(DebugMetaInterface.class, new DebugMetaInterfaceBinding());
        HttpInterfaceBinding httpBinding = new HttpInterfaceBinding();
        //TODO: Add a way to clean the HttpRequest
        //httpBinding.
        marshaller.addInterfaceBinding(HttpInterface.class, httpBinding);

        // Enable compression unless the option is set to false
        marshaller.setCompression(getCompressionEnabled(dsn));

        return marshaller;
    }
326221
def _GetSubFlowNetworkLimit(self):
    """"""

    subflow_network_limit = None

    if self.runner_args.per_client_network_limit_bytes:
      subflow_network_limit = self.runner_args.per_client_network_limit_bytes

    if self.runner_args.network_bytes_limit:
      remaining_network_quota = (
          self.runner_args.network_bytes_limit -
          self.context.network_bytes_sent)
      if subflow_network_limit is None:
        subflow_network_limit = remaining_network_quota
      else:
        subflow_network_limit = min(subflow_network_limit,
                                    remaining_network_quota)

    return subflow_network_limit
179671
public int getMessageLength(){
		// Message type, number of transients
		int length = 1 + 4;
		if(this.requests != null){
			for(OnDemandRequest request : this.requests){
				length += request.getLength();
			}
		}
		
		return length;
	}
12903
public QueryPlus<T> withMaxQueuedBytes(long maxQueuedBytes)
  {
    return new QueryPlus<>(
        query.withOverriddenContext(ImmutableMap.of(QueryContexts.MAX_QUEUED_BYTES_KEY, maxQueuedBytes)),
        queryMetrics,
        identity
    );
  }
1209061
private int calcStackSize() {
        int i, max;
        int result;
        int[] startStack;
        ExceptionInfo e;
        int tmp;
        int unreachable;
        IntBitSet todo;
        List<Jsr> jsrs;

        jsrs = Jsr.findJsrs(this);
        startStack = new int[instructions.size()];
        for (i = 0; i < startStack.length; i++) {
            startStack[i] = -1;
        }
        startStack[0] = 0;
        todo = new IntBitSet();
        todo.add(0);
        max = exceptions.size();
        for (i = 0; i < max; i++) {
            e = exceptions.get(i);
            startStack[e.handler] = 1;
            todo.add(e.handler);
        }

        fillStack(jsrs, todo, startStack);

        result = 0;
        unreachable = -1;
        for (i = 0; i < startStack.length; i++) {
            tmp = startStack[i];
            if (tmp > result) {
                result = tmp;
            }
            if ((unreachable == -1) && (tmp == -1)) {
                unreachable = i;
            }
        }
        if (unreachable != -1) {
            // There are several class file in Sun JDK 1.3 with dead
            // code, and they pass class file validation:
            // (e.g. com.sun.corba.se.intneral.io.util.Arrays)

            LOGGER.warning("unreachable code, starting " + unreachable + "\n");
        }
        return result;
    }
714883
public static int getMaxBufferSizeToSave(final HttpServerExchange exchange) {
        int maxSize = exchange.getConnection().getUndertowOptions().get(UndertowOptions.MAX_BUFFERED_REQUEST_SIZE, UndertowOptions.DEFAULT_MAX_BUFFERED_REQUEST_SIZE);
        return  maxSize;
    }
430526
public Long getMaxRequestSize()
   {
      if (childNode.getTextValueForPatternName("max-request-size") != null && !childNode.getTextValueForPatternName("max-request-size").equals("null")) {
         return Long.valueOf(childNode.getTextValueForPatternName("max-request-size"));
      }
      return null;
   }
1325775
protected int getAsyncPriority(Dsn dsn) {
        return Util.parseInteger(Lookup.lookup(ASYNC_PRIORITY_OPTION, dsn), Thread.MIN_PRIORITY);
    }