- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 136 for Rate (0.02 sec)
-
src/main/java/jcifs/util/AuthenticationRateLimiter.java
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import jcifs.smb.SmbException; /** * Rate limiter for authentication attempts to prevent brute force attacks. * * Features: * - Per-account rate limiting * - Per-IP rate limiting * - Global rate limiting * - Exponential backoff for repeated failures * - Account lockout after threshold * - Automatic cleanup of old entries */
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 15.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
* we change the rate. */ public void testWeNeverGetABurstMoreThanOneSec() { RateLimiter limiter = RateLimiter.create(1.0, stopwatch); int[] rates = {1000, 1, 10, 1000000, 10, 1}; for (int rate : rates) { int oneSecWorthOfWork = rate; stopwatch.sleepMillis(rate * 1000); limiter.setRate(rate);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 21.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/RateLimiterTest.java
* we change the rate. */ public void testWeNeverGetABurstMoreThanOneSec() { RateLimiter limiter = RateLimiter.create(1.0, stopwatch); int[] rates = {1000, 1, 10, 1000000, 10, 1}; for (int rate : rates) { int oneSecWorthOfWork = rate; stopwatch.sleepMillis(rate * 1000); limiter.setRate(rate);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 21.9K bytes - Viewed (0) -
src/test/java/jcifs/util/AuthenticationRateLimiterTest.java
// Make many attempts to trigger global rate limit for (int i = 1; i <= 20; i++) { assertTrue(rateLimiter.checkAttempt("user" + i, "192.168.1." + i), "Attempt " + i + " should be allowed"); } // 21st attempt should be blocked by global rate limit assertFalse(rateLimiter.checkAttempt("user21", "192.168.1.21"), "Should block after global rate limit"); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 15.8K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/multichannel/ChannelInfo.java
} /** * Increment error counter */ public void incrementErrors() { errors.incrementAndGet(); } /** * Get error rate (errors / total requests) * * @return error rate between 0.0 and 1.0 */ public double getErrorRate() { long total = requestsSent.get(); if (total == 0) return 0.0;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 11:13:46 UTC 2025 - 10.6K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/multichannel/ChannelInfoTest.java
assertTrue(primaryScore > baseScore); // High error rate should reduce score channelInfo.setState(ChannelState.ESTABLISHED); channelInfo.setPrimary(false); for (int i = 0; i < 20; i++) { channelInfo.incrementRequestsSent(); channelInfo.incrementErrors(); // 100% error rate } int highErrorScore = channelInfo.getScore();
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 11:13:46 UTC 2025 - 7.4K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LinearTransformation.java
return new VerticalLinearTransformation(x1); } else { return withSlope((y2 - y1) / (x2 - x1)); } } /** * Finish building an instance with the given slope, i.e. the rate of change of {@code y} with * respect to {@code x}. The slope must not be {@code NaN}. It may be infinite, in which case * the transformation is vertical. (If it is zero, the transformation is horizontal.) */
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 9.7K bytes - Viewed (0) -
src/main/java/jcifs/audit/SecurityAuditLogger.java
} /** * Configure rate limiting * * @param windowMs time window in milliseconds * @param maxEvents maximum events per window */ public void setRateLimit(long windowMs, int maxEvents) { this.rateLimitWindow = windowMs; this.maxEventsPerWindow = maxEvents; log.info("Rate limiting set to {} events per {} ms", maxEvents, windowMs); }
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 26.6K bytes - Viewed (0) -
src/main/java/jcifs/util/SmbCircuitBreaker.java
long avgResponseTime = metrics.getAverageResponseTime(); // Adjust threshold based on failure rate and response time trends int currentThreshold = this.failureThreshold; int newThreshold = currentThreshold; // If failure rate is high but response time is normal, be more lenient if (failureRate > 0.5 && avgResponseTime < 5000) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 33.4K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb2/rdma/RdmaErrorHandler.java
} } // If we've had many errors, consider fallback double errorRate = statistics.getErrorRate(); if (errorRate > 0.1) { // More than 10% error rate log.warn("High RDMA error rate ({:.1f}%), TCP fallback recommended", errorRate * 100); return true; } return false; } /**
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 10.5K bytes - Viewed (0)