Skip to content

Commit

Permalink
Change weight to be int (#2415)
Browse files Browse the repository at this point in the history
  • Loading branch information
heyams authored Jul 22, 2022
1 parent 83f3613 commit 2219f44
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ private static int charToInt(char c) {
class FinalCounters {

final int exceptions;
final long requests;
final int requests;
final double requestsDuration;
final int unsuccessfulRequests;
final long rdds;
Expand All @@ -370,7 +370,7 @@ private FinalCounters(Counters currentCounters) {

CountAndDuration countAndDuration =
Counters.decodeCountAndDuration(currentCounters.requestsAndDurations.get());
requests = countAndDuration.count;
requests = (int) countAndDuration.count;
this.requestsDuration = countAndDuration.duration;
this.unsuccessfulRequests = currentCounters.unsuccessfulRequests.get();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private static List<QuickPulseMetrics> addMetricsToQuickPulseEnvelope(
new QuickPulseMetrics(
"\\ApplicationInsights\\Dependency Call Duration",
counters.rddsDuration / counters.rdds,
counters.rdds));
(int) counters.rdds));
}
metricsList.add(
new QuickPulseMetrics(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class QuickPulseMetrics {
private final double value;

@JsonProperty(value = "Weight")
private final long weight;
private final int weight;

public QuickPulseMetrics(String name, double value, long weight) {
public QuickPulseMetrics(String name, double value, int weight) {
this.name = name;
this.value = value;
this.weight = weight;
Expand All @@ -48,7 +48,7 @@ public double getValue() {
return value;
}

public long getWeight() {
public int getWeight() {
return weight;
}
}

0 comments on commit 2219f44

Please sign in to comment.