Commit cadf05f9 by 胡青青

全局采样率可配置

parent 802f365e
...@@ -144,10 +144,10 @@ public class RefreshSamplerLocalProperties implements ApplicationContextAware, I ...@@ -144,10 +144,10 @@ public class RefreshSamplerLocalProperties implements ApplicationContextAware, I
* @return * @return
*/ */
public static String getPercentageSamplerHashCode(SamplerLocalProperties samplerLocalProperties) { public static String getPercentageSamplerHashCode(SamplerLocalProperties samplerLocalProperties) {
StringBuffer reconcileHashCode = new StringBuffer((samplerLocalProperties.getPercentage() + STATUS_DELIMITER).hashCode()); StringBuffer reconcileHashCode = new StringBuffer((samplerLocalProperties.getPercentage() + STATUS_DELIMITER));
for (UriSampleProperties uriSampleProperties : samplerLocalProperties.getUriSamples()) { for (UriSampleProperties uriSampleProperties : samplerLocalProperties.getUriSamples()) {
reconcileHashCode.append(uriSampleProperties.getUriRegex().hashCode() + STATUS_DELIMITER.hashCode()); reconcileHashCode.append(uriSampleProperties.getUriRegex().hashCode() + STATUS_DELIMITER);
reconcileHashCode.append((uriSampleProperties.getUriPercentage() + STATUS_DELIMITER).hashCode()); reconcileHashCode.append((uriSampleProperties.getUriPercentage() + STATUS_DELIMITER));
} }
return reconcileHashCode.toString(); return reconcileHashCode.toString();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment