public class org.eclipse.jetty.util.statistic.RateStatistic
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.eclipse.jetty.util.statistic.RateStatistic
super_class: java.lang.Object
{
private final java.util.Deque<java.lang.Long> _samples;
descriptor: Ljava/util/Deque;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/Deque<Ljava/lang/Long;>;
private final long _nanoPeriod;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.TimeUnit _units;
descriptor: Ljava/util/concurrent/TimeUnit;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private long _max;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private long _count;
descriptor: J
flags: (0x0002) ACC_PRIVATE
public void <init>(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=3
start local 0 start local 1 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.util.ArrayDeque
dup
invokespecial java.util.ArrayDeque.<init>:()V
putfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
2: aload 0
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
lload 1
aload 3
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
putfield org.eclipse.jetty.util.statistic.RateStatistic._nanoPeriod:J
3: aload 0
aload 3
putfield org.eclipse.jetty.util.statistic.RateStatistic._units:Ljava/util/concurrent/TimeUnit;
4: return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
0 5 1 period J
0 5 3 units Ljava/util/concurrent/TimeUnit;
MethodParameters:
Name Flags
period
units
public long getPeriod();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._units:Ljava/util/concurrent/TimeUnit;
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._nanoPeriod:J
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
public java.util.concurrent.TimeUnit getUnits();
descriptor: ()Ljava/util/concurrent/TimeUnit;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._units:Ljava/util/concurrent/TimeUnit;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
public void reset();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.clear:()V
2: aload 0
lconst_0
putfield org.eclipse.jetty.util.statistic.RateStatistic._max:J
3: aload 0
lconst_0
putfield org.eclipse.jetty.util.statistic.RateStatistic._count:J
4: aload 1
monitorexit
5: goto 8
StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
6: aload 1
monitorexit
7: athrow
8: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
Exception table:
from to target type
1 5 6 any
6 7 6 any
private void update();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.lang.System.nanoTime:()J
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.update:(J)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
private void update(long);
descriptor: (J)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: lload 1
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._nanoPeriod:J
lsub
lstore 3
start local 3 1: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.peekFirst:()Ljava/lang/Object;
checkcast java.lang.Long
astore 5
start local 5 2: goto 5
3: StackMap locals: long java.lang.Long
StackMap stack:
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.removeFirst:()Ljava/lang/Object;
pop
4: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.peekFirst:()Ljava/lang/Object;
checkcast java.lang.Long
astore 5
5: StackMap locals:
StackMap stack:
aload 5
ifnull 6
aload 5
invokevirtual java.lang.Long.longValue:()J
lload 3
lcmp
iflt 3
6: StackMap locals:
StackMap stack:
return
end local 5 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
0 7 1 now J
1 7 3 expire J
2 7 5 head Ljava/lang/Long;
MethodParameters:
Name Flags
now
protected void age(long, java.util.concurrent.TimeUnit);
descriptor: (JLjava/util/concurrent/TimeUnit;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=9, args_size=3
start local 0 start local 1 start local 3 0: getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
lload 1
aload 3
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lstore 4
start local 4 1: aload 0
dup
astore 6
monitorenter
2: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.size:()I
istore 7
start local 7 3: iconst_0
istore 8
start local 8 4: goto 7
5: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic long java.util.concurrent.TimeUnit long org.eclipse.jetty.util.statistic.RateStatistic int int
StackMap stack:
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.removeFirst:()Ljava/lang/Object;
checkcast java.lang.Long
invokevirtual java.lang.Long.longValue:()J
lload 4
lsub
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface java.util.Deque.addLast:(Ljava/lang/Object;)V
6: iinc 8 1
StackMap locals:
StackMap stack:
7: iload 8
iload 7
if_icmplt 5
end local 8 8: aload 0
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.update:()V
end local 7 9: aload 6
monitorexit
10: goto 13
StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic long java.util.concurrent.TimeUnit long org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
11: aload 6
monitorexit
12: athrow
13: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
0 14 1 period J
0 14 3 units Ljava/util/concurrent/TimeUnit;
1 14 4 increment J
3 9 7 size I
4 8 8 i I
Exception table:
from to target type
2 10 11 any
11 12 11 any
MethodParameters:
Name Flags
period
units
public int record();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=1
start local 0 0: invokestatic java.lang.System.nanoTime:()J
lstore 1
start local 1 1: aload 0
dup
astore 3
monitorenter
2: aload 0
dup
getfield org.eclipse.jetty.util.statistic.RateStatistic._count:J
lconst_1
ladd
putfield org.eclipse.jetty.util.statistic.RateStatistic._count:J
3: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
invokeinterface java.util.Deque.add:(Ljava/lang/Object;)Z
pop
4: aload 0
lload 1
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.update:(J)V
5: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.size:()I
istore 4
start local 4 6: iload 4
i2l
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._max:J
lcmp
ifle 8
7: aload 0
iload 4
i2l
putfield org.eclipse.jetty.util.statistic.RateStatistic._max:J
8: StackMap locals: long org.eclipse.jetty.util.statistic.RateStatistic int
StackMap stack:
iload 4
aload 3
monitorexit
9: ireturn
end local 4 10: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic long org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 3
monitorexit
11: athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
1 12 1 now J
6 10 4 rate I
Exception table:
from to target type
2 9 10 any
10 11 10 any
public int getRate();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.update:()V
2: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.size:()I
aload 1
monitorexit
3: ireturn
4: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 1
monitorexit
5: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
Exception table:
from to target type
1 3 4 any
4 5 4 any
public long getMax();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._max:J
aload 1
monitorexit
2: lreturn
3: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 1
monitorexit
4: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
Exception table:
from to target type
1 2 3 any
3 4 3 any
public long getOldest(java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/concurrent/TimeUnit;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
dup
astore 2
monitorenter
1: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.peekFirst:()Ljava/lang/Object;
checkcast java.lang.Long
astore 3
start local 3 2: aload 3
ifnonnull 5
3: aload 2
monitorexit
4: ldc -1
lreturn
5: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic java.lang.Long
StackMap stack:
aload 1
invokestatic java.lang.System.nanoTime:()J
aload 3
invokevirtual java.lang.Long.longValue:()J
lsub
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
aload 2
monitorexit
6: lreturn
end local 3 7: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic java.util.concurrent.TimeUnit org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 2
monitorexit
8: athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
0 9 1 units Ljava/util/concurrent/TimeUnit;
2 7 3 head Ljava/lang/Long;
Exception table:
from to target type
1 4 7 any
5 6 7 any
7 8 7 any
MethodParameters:
Name Flags
units
public long getCount();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
dup
astore 1
monitorenter
1: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._count:J
aload 1
monitorexit
2: lreturn
3: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 1
monitorexit
4: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
Exception table:
from to target type
1 2 3 any
3 4 3 any
public java.lang.String dump();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getstatic java.util.concurrent.TimeUnit.MINUTES:Ljava/util/concurrent/TimeUnit;
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.dump:(Ljava/util/concurrent/TimeUnit;)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
public java.lang.String dump(java.util.concurrent.TimeUnit);
descriptor: (Ljava/util/concurrent/TimeUnit;)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=6, args_size=2
start local 0 start local 1 0: invokestatic java.lang.System.nanoTime:()J
lstore 2
start local 2 1: aload 0
dup
astore 4
monitorenter
2: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.stream:()Ljava/util/stream/Stream;
3: aload 1
lload 2
invokedynamic applyAsLong(Ljava/util/concurrent/TimeUnit;J)Ljava/util/function/ToLongFunction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(Ljava/lang/Object;)J
org/eclipse/jetty/util/statistic/RateStatistic.lambda$0(Ljava/util/concurrent/TimeUnit;JLjava/lang/Long;)J (6)
(Ljava/lang/Long;)J
invokeinterface java.util.stream.Stream.mapToLong:(Ljava/util/function/ToLongFunction;)Ljava/util/stream/LongStream;
4: invokedynamic apply()Ljava/util/function/LongFunction;
Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
Method arguments:
(J)Ljava/lang/Object;
java/lang/Long.toString(J)Ljava/lang/String; (6)
(J)Ljava/lang/String;
invokeinterface java.util.stream.LongStream.mapToObj:(Ljava/util/function/LongFunction;)Ljava/util/stream/Stream;
5: invokestatic java.lang.System.lineSeparator:()Ljava/lang/String;
invokestatic java.util.stream.Collectors.joining:(Ljava/lang/CharSequence;)Ljava/util/stream/Collector;
invokeinterface java.util.stream.Stream.collect:(Ljava/util/stream/Collector;)Ljava/lang/Object;
checkcast java.lang.String
6: astore 5
start local 5 7: ldc "%s%n%s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
lload 2
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.toString:(J)Ljava/lang/String;
aastore
dup
iconst_1
aload 5
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 4
monitorexit
8: areturn
end local 5 9: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic java.util.concurrent.TimeUnit long org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 4
monitorexit
10: athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
0 11 1 units Ljava/util/concurrent/TimeUnit;
1 11 2 now J
7 9 5 samples Ljava/lang/String;
Exception table:
from to target type
2 8 9 any
9 10 9 any
MethodParameters:
Name Flags
units
public java.lang.String toString();
descriptor: ()Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
invokestatic java.lang.System.nanoTime:()J
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.toString:(J)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
private java.lang.String toString(long);
descriptor: (J)Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=8, locals=4, args_size=2
start local 0 start local 1 0: aload 0
dup
astore 3
monitorenter
1: aload 0
lload 1
invokevirtual org.eclipse.jetty.util.statistic.RateStatistic.update:(J)V
2: ldc "%s@%x{count=%d,max=%d,rate=%d per %d %s}"
bipush 7
anewarray java.lang.Object
dup
iconst_0
3: aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
aastore
dup
iconst_1
aload 0
invokevirtual java.lang.Object.hashCode:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_2
4: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._count:J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
dup
iconst_3
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._max:J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
dup
iconst_4
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._samples:Ljava/util/Deque;
invokeinterface java.util.Deque.size:()I
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_5
5: aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._units:Ljava/util/concurrent/TimeUnit;
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._nanoPeriod:J
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
dup
bipush 6
aload 0
getfield org.eclipse.jetty.util.statistic.RateStatistic._units:Ljava/util/concurrent/TimeUnit;
aastore
6: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
aload 3
monitorexit
7: areturn
8: StackMap locals: org.eclipse.jetty.util.statistic.RateStatistic long org.eclipse.jetty.util.statistic.RateStatistic
StackMap stack: java.lang.Throwable
aload 3
monitorexit
9: athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/eclipse/jetty/util/statistic/RateStatistic;
0 10 1 nanoTime J
Exception table:
from to target type
1 7 8 any
8 9 8 any
MethodParameters:
Name Flags
nanoTime
private static long lambda$0(java.util.concurrent.TimeUnit, long, java.lang.Long);
descriptor: (Ljava/util/concurrent/TimeUnit;JLjava/lang/Long;)J
flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
Code:
stack=5, locals=4, args_size=3
start local 3 0: aload 0
lload 1
aload 3
invokevirtual java.lang.Long.longValue:()J
lsub
getstatic java.util.concurrent.TimeUnit.NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invokevirtual java.util.concurrent.TimeUnit.convert:(JLjava/util/concurrent/TimeUnit;)J
lreturn
end local 3 LocalVariableTable:
Start End Slot Name Signature
0 1 3 t Ljava/lang/Long;
}
SourceFile: "RateStatistic.java"
InnerClasses:
public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles