com.google.javascript.jscomp.PerformanceTracker.class Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of closure-compiler-unshaded Show documentation
Show all versions of closure-compiler-unshaded Show documentation
Closure Compiler is a JavaScript optimizing compiler. It parses your
JavaScript, analyzes it, removes dead code and rewrites and minimizes
what's left. It also checks syntax, variable references, and types, and
warns about common JavaScript pitfalls. It is used in many of Google's
JavaScript apps, including Gmail, Google Web Search, Google Maps, and
Google Docs.
The newest version!
???? 7?
java/lang/Object ()V )com/google/javascript/jscomp/RecentChange
/com/google/javascript/jscomp/PerformanceTracker
codeChange +Lcom/google/javascript/jscomp/RecentChange; initAstSize I initCodeSize initGzCodeSize
passesRuntime maxMem ! " runs $ % changes ' ( loopRuns * + loopChanges - . jsLines 0 1 jsSources 3 4 externLines 6 7
externSources 9 : astSize < = codeSize ? @
gzCodeSize B C astDiff E F diff H I gzDiff K java/util/ArrayDeque
J N O P currentPass Ljava/util/Deque; R java/util/ArrayList
Q U V W log Ljava/util/List; Y not executed [ \ ] disambiguatePropertiesSummary Ljava/lang/String; _ ` ] ambiguatePropertiesSummary b c d e f 7com/google/javascript/jscomp/CompilerOptions$TracerMode OFF 9Lcom/google/javascript/jscomp/CompilerOptions$TracerMode; h 2PerformanceTracker can't work without tracer data.
j k l m n $com/google/common/base/Preconditions
checkArgument (ZLjava/lang/Object;)V
p q r s t java/lang/System currentTimeMillis ()J v w x startTime J z { | externsRoot "Lcom/google/javascript/rhino/Node; ~ | jsRoot ? ? f mode ? 5com/google/javascript/jscomp/PerformanceTracker$Stats
? ? ? (Ljava/lang/String;Z)V ? ? ? ? ? java/util/Deque push (Ljava/lang/Object;)V ? toSource
? ? ? ? ? java/lang/String equals (Ljava/lang/Object;)Z
? ? reset
? ? ?
tracksAstSize ()Z
? ? ? ? ? %com/google/javascript/jscomp/NodeUtil countAstSize %(Lcom/google/javascript/rhino/Node;)I
? ? ?
tracksSize
? ? ? tracksGzSize
? ? ? ? ? @com/google/javascript/jscomp/PerformanceTrackerCodeSizeEstimator estimate g(Lcom/google/javascript/rhino/Node;Z)Lcom/google/javascript/jscomp/PerformanceTrackerCodeSizeEstimator;
? ? ? ? getCodeSize ()I
? ? ? ? getZippedCodeSize
? ? ? getAllocatedMegabytes ? ? ? ? pop ()Ljava/lang/Object; ? ? ? ] pass
j ? ? ?
checkState (Z)V ? ? ? ? ? java/util/List add ? ? ? x runtime ? ? ? allocMem ? !
? ? ? hasCodeChanged ? $ ? &com/google/javascript/jscomp/PassNames ? parseInputs
? ? ? recordParsingStop :(Lcom/google/javascript/jscomp/PerformanceTracker$Stats;)V
? ? ? recordOtherPassStop
? ? ? tracksAstManifest
? ? populateAstManifest
? ? recordInputCount ? 9 ? ? ? size ? ? ? gzSize ? B ? E ? H
? ? ? ? ? com/google/javascript/rhino/Node
getFirstChild $()Lcom/google/javascript/rhino/Node;
? ? ? ? estimateNumLines
? ? ? ? getNext
t %com/google/javascript/jscomp/Platform totalMemory
t
freeMemory
bytesToMB (J)I b
f RAW_SIZE b f ALL b f TIMING_ONLY
b ? isOn
calcTotalStats passSummary (Lcom/google/common/collect/ImmutableMap; ! x endTime
#$ populatePassSummary
&'()* &com/google/common/collect/ImmutableMap entrySet *()Lcom/google/common/collect/ImmutableSet;
,-./0 &com/google/common/collect/ImmutableSet iterator 2()Lcom/google/common/collect/UnmodifiableIterator;2345 ? java/util/Iterator hasNext278 ? next: java/util/Map$Entry9<= ? getValue
?@ABC java/lang/Math max (II)I ?EFG isOneTime ZI java/util/LinkedHashMap
H ?L/M ()Ljava/util/Iterator; OPQ apply V(Lcom/google/javascript/jscomp/PerformanceTracker$Stats;)Ljava/util/function/Function;
HSTU computeIfAbsent C(Ljava/lang/Object;Ljava/util/function/Function;)Ljava/lang/Object;
&WXY copyOf 9(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap; [\] astManifest -Lcom/google/common/collect/ImmutableMultiset;
_`abc +com/google/common/collect/ImmutableMultiset builder 7()Lcom/google/common/collect/ImmutableMultiset$Builder; efg visit f(Lcom/google/common/collect/ImmutableMultiset$Builder;)Lcom/google/javascript/jscomp/NodeUtil$Visitor;
?ijk
visitPreOrder T(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/NodeUtil$Visitor;)V
mnopq 3com/google/common/collect/ImmutableMultiset$Builder build /()Lcom/google/common/collect/ImmutableMultiset;s verbose:pretty:all
uvwxy 'com/google/javascript/jscomp/JvmMetrics maybeWriteJvmMetrics *(Ljava/io/PrintStream;Ljava/lang/String;)V{ } TOTAL: ?? makeConcatWithConstants (J)Ljava/lang/String; ??? (I)Ljava/lang/String; ? ? ? ?
? ? ?
? ? ? ? ??? &(Ljava/lang/String;)Ljava/lang/String; ?
????? /com/google/javascript/jscomp/base/JSCompStrings lines '([Ljava/lang/String;)Ljava/lang/String;
????? java/io/PrintStream println (Ljava/lang/String;)V? Inputs: ? ? ? ?? Summary:? Jpass,runtime,allocMem,runs,changingRuns,astReduction,reduction,gzReduction
,??? stream ()Ljava/util/stream/Stream; ??? applyAsLong %()Ljava/util/function/ToLongFunction;????? java/util/Comparator
comparingLong ;(Ljava/util/function/ToLongFunction;)Ljava/util/Comparator;????? java/util/stream/Stream sorted 1(Ljava/util/Comparator;)Ljava/util/stream/Stream; ?P? ()Ljava/util/function/Function;???? map 8(Ljava/util/function/Function;)Ljava/util/stream/Stream;
????? java/util/Objects requireNonNull &(Ljava/lang/Object;)Ljava/lang/Object; ??? accept 4(Ljava/io/PrintStream;)Ljava/util/function/Consumer;???? forEach (Ljava/util/function/Consumer;)V? Log:? Xpass,runtime,allocMem,codeChanged,astReduction,reduction,gzReduction,astSize,size,gzSize? %s,%d,%d,%b,%d,%d,%d,%d,%d,%d
????? java/lang/Long valueOf (J)Ljava/lang/Long;
????? java/lang/Integer (I)Ljava/lang/Integer;
????? java/lang/Boolean (Z)Ljava/lang/Boolean;
????? 5com/google/javascript/jscomp/base/format/SimpleFormat format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
???? print? Input AST Manifest:? token,count
_' ?????
???
? java/io/FilterOutputStream flush java/io/IOException java/lang/RuntimeException Unreachable.
*(Ljava/lang/String;Ljava/lang/Throwable;)V
%s,%d ? (com/google/common/collect/Multiset$Entry
getElement ? getCount9 ? getKey %s,%d,%d,%d,%d,%d,%d,%d
? getToken %()Lcom/google/javascript/rhino/Token;
m ?! I(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMultiset$Builder; DEFAULT_WHEN_SIZE_UNTRACKED
ConstantValue???? Signature JLjava/util/Deque; sLcom/google/common/collect/ImmutableMap; RLcom/google/common/collect/ImmutableMultiset; ILjava/util/List; ?(Lcom/google/javascript/rhino/Node;Lcom/google/javascript/rhino/Node;Lcom/google/javascript/jscomp/CompilerOptions$TracerMode;)V Code LineNumberTable LocalVariableTable this 1Lcom/google/javascript/jscomp/PerformanceTracker;
StackMapTable MethodParameters getCodeChangeHandler 2()Lcom/google/javascript/jscomp/CodeChangeHandler; recordPassStart passName updateAfterDeserialize %(Lcom/google/javascript/rhino/Node;)V estimator BLcom/google/javascript/jscomp/PerformanceTrackerCodeSizeEstimator; recordPassStop (Ljava/lang/String;J)V logStats 7Lcom/google/javascript/jscomp/PerformanceTracker$Stats; newSize n bytes
getRuntime getSize getGzSize
getAstSize
getChanges RuntimeInvisibleAnnotations 1Lcom/google/common/annotations/VisibleForTesting; getLoopChanges getRuns getLoopRuns getStats *()Lcom/google/common/collect/ImmutableMap; u()Lcom/google/common/collect/ImmutableMap; stats entry Ljava/util/Map$Entry; LocalVariableTypeTable `Ljava/util/Map$Entry; logStat tmpPassSummary Ljava/util/LinkedHashMap; dLjava/util/LinkedHashMap; 5Lcom/google/common/collect/ImmutableMultiset$Builder; ZLcom/google/common/collect/ImmutableMultiset$Builder; setDisambiguatePropertiesSummary summary setAmbiguatePropertiesSummary outputTracerReport (Ljava/io/PrintStream;)V e Ljava/io/IOException; output Ljava/io/PrintStream;c [Ljava/lang/Object; lambda$outputTracerReport$4 >(Lcom/google/common/collect/Multiset$Entry;)Ljava/lang/String; *Lcom/google/common/collect/Multiset$Entry; lambda$outputTracerReport$3 )(Ljava/util/Map$Entry;)Ljava/lang/String; key lambda$outputTracerReport$2 (Ljava/util/Map$Entry;)J lambda$populateAstManifest$1 Z(Lcom/google/common/collect/ImmutableMultiset$Builder;Lcom/google/javascript/rhino/Node;)V lambda$populatePassSummary$0 ?(Lcom/google/javascript/jscomp/PerformanceTracker$Stats;Ljava/lang/String;)Lcom/google/javascript/jscomp/PerformanceTracker$Stats; k
SourceFile PerformanceTracker.java NestMembers BootstrapMethodsv
wxyz{ "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;?~
no? K(Ljava/lang/String;)Lcom/google/javascript/jscomp/PerformanceTracker$Stats;7?
?lm?
????? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;? Start time(ms): ? End time(ms): ? Wall time(ms): ? Passes runtime(ms): ? /Max mem usage (measured after each pass)(MB): ? #Runs: ? #Changing runs: ? #Loopable runs: ? #Changing loopable runs: ? "Estimated AST reduction(#nodes): ? Estimated Reduction(bytes): ? Estimated GzReduction(bytes): ? Estimated AST size(#nodes): ? Estimated Size(bytes): ? Estimated GzSize(bytes): ? DisambiguateProperties: ? AmbiguateProperties: ?
JS lines: ?
JS sources: ? Extern lines: ? Extern sources: ? (Ljava/lang/Object;)J?
?jkk?
?ghh ????
?dee InnerClasses? ,com/google/javascript/jscomp/CompilerOptions
TracerMode Stats?
java/util/Map Entry Builder? -com/google/javascript/jscomp/NodeUtil$Visitor Visitor? "com/google/common/collect/Multiset? %java/lang/invoke/MethodHandles$Lookup? java/lang/invoke/MethodHandles Lookup 1 " # $ { | ? f | w x ! x " % ( + . 1 4 7 : = @ C F I O P % &