Skip to content

Commit

Permalink
fix object trace reader
Browse files Browse the repository at this point in the history
  • Loading branch information
guykhazma authored and ohadeytan committed Nov 9, 2022
1 parent 24da0f8 commit 9536f65
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@ public Stream<AccessEvent> events() {
.filter(array -> array[1].equals("REST.GET.OBJECT"))
.flatMap(array -> {
long key = new BigInteger(array[2], 16).longValue();
int weight;
if (array.length == 3) {
weight = Integer.parseInt(array[3]);
} else {
long start = Long.parseLong(array[4]);
long end = Long.parseLong(array[5]);
weight = Ints.saturatedCast(end - start);
}
long start = Long.parseLong(array[4]);
long end = Long.parseLong(array[5]);
int weight = Ints.saturatedCast(end - start);
if (weight < 0) {
return Stream.empty();
}
Expand Down

0 comments on commit 9536f65

Please sign in to comment.