Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e2084a9
Log incoming requests along with request duration
smellsblue Sep 21, 2016
0abaa87
Create new index that does nothing and replace html templates with mu…
smellsblue Sep 21, 2016
442d0b3
Convert ServerNotReadyQuery to use mustache and add memory details to…
smellsblue Sep 21, 2016
65bf758
Convert AllClassesQuery into a Mustache template
smellsblue Sep 21, 2016
d7aa7db
Convert AllRootsQuery to Mustache
smellsblue Sep 26, 2016
0b20664
Refactor AllClassesQuery to use view models, and move the newer metho…
smellsblue Sep 26, 2016
dadc277
Refactor MemoryUsageDetails to be a view model
smellsblue Sep 26, 2016
93b4c96
Convert over the InstancesCountQuery
smellsblue Sep 28, 2016
497b08f
Break out server to it's own
smellsblue Sep 28, 2016
16af180
Support loading a dump while the server is running
smellsblue Sep 28, 2016
57f106e
Drop the dots in favor of a log that will play well with request log …
smellsblue Sep 28, 2016
4d28180
Allow unloading a dump
smellsblue Sep 28, 2016
fcc0f40
Fix up parameter parsing
smellsblue Sep 29, 2016
fd6812f
Add a comment
smellsblue Sep 29, 2016
3f7e5d4
Disallow dumps outside the configured heaps directory, except when it…
smellsblue Sep 29, 2016
6b95192
Speed up histogram pages by pre-caching the total instance size
smellsblue Oct 1, 2016
d6cb432
Parallelize the caching of histograms
smellsblue Oct 1, 2016
aaf0dc9
Drop most loading output since the server shows an easier to read pro…
smellsblue Oct 2, 2016
b0a5a11
Convert InstancesQuery to mustache view
smellsblue Oct 3, 2016
7d573f9
Mustachify the ClassQuery
smellsblue Oct 6, 2016
2c1572f
Mustachify ObjectQuery
smellsblue Oct 7, 2016
60bde8a
Use divs and paragraph tags instead of break tags
smellsblue Oct 7, 2016
6b5e274
Mustachify the error page
smellsblue Oct 7, 2016
45e4fa9
Reduce routes by pulling out a parameter
smellsblue Oct 7, 2016
990790f
Consolidate instances count query to 1 route
smellsblue Oct 7, 2016
105be1a
Consolidate instances of the instance query to 1 route
smellsblue Oct 7, 2016
62df021
Mustachify RootsQuery
smellsblue Oct 7, 2016
da248f3
Reduce routes by pulling out parameter and fix bug with missing objec…
smellsblue Oct 7, 2016
702ec9e
Remove some no longer needed methods
smellsblue Oct 8, 2016
fb9e99e
Mustachify FinalizerObjectsQuery
smellsblue Oct 8, 2016
501fab8
Mustachify ReachableQuery
smellsblue Oct 8, 2016
76a7604
Mustachify RootStackQuery and drop some no longer used methods
smellsblue Oct 10, 2016
d9135e0
Convert HistogramQuery to a mustache query handler
smellsblue Oct 28, 2016
e43908f
Convert FinalizerSummaryQuery to a MustacheQuery
smellsblue Oct 31, 2016
2c8647c
Move the OQLEngine around a bit
smellsblue Oct 31, 2016
e4ce3f2
Convert OQLEngine to return a Stream rather than using a visitor
smellsblue Oct 31, 2016
f256335
Mustachify OQLQuery
smellsblue Oct 31, 2016
efd9c5e
Mustachify RefsByTypeQuery
smellsblue Nov 1, 2016
a2f2b0f
Mustachify DebugQuery and remove a bunch of no longer needed methods
smellsblue Nov 1, 2016
6df358f
Peer review feedback
smellsblue Dec 19, 2016
a4d7698
Convert to a more standard maven project, but keep ant working for no…
smellsblue Dec 19, 2016
0297721
Start some tests and add some more peer review feedback
smellsblue Dec 19, 2016
03091a2
Some peer review feedback and some other changes
smellsblue Dec 20, 2016
126278c
Synchornize access to loadingSnapshot
smellsblue Dec 20, 2016
c39044c
Peer review feedback: suppliers for total instance size cache
smellsblue Dec 20, 2016
f0e5c97
Some more peer review feedback
smellsblue Dec 20, 2016
aeb5ea7
Peer review feedback: return Stream for JavaClass#getInstances
smellsblue Dec 30, 2016
d6164bf
Peer review feedback: use Stopwatch for keeping track of elapsed time
smellsblue Dec 30, 2016
4b9e156
Peer review feedback: first pass at adding @ViewGetter annotation for…
smellsblue Dec 30, 2016
8453bfb
Peer review feedback: add the rest of the @ViewGetter annotations
smellsblue Dec 31, 2016
89d8d8c
Peer review feedback: use method references. Also ensure reader is cl…
smellsblue Jan 3, 2017
00771ff
Peer review feedback: use memoize and rename method to a more appropr…
smellsblue Jan 3, 2017
ae10087
Peer review feedback: memoize the model
smellsblue Jan 3, 2017
718ec1c
Peer review feedback: drop array hack and have visitor return the res…
smellsblue Jan 3, 2017
4598771
Peer review feedback: drop unnecessary null checks
smellsblue Jan 3, 2017
3ccb31c
Peer review feedback: convert all referer to referrer
smellsblue Jan 3, 2017
51ed09c
Peer review feedback: use Duration class to simplify formatTime
smellsblue Jan 3, 2017
213335d
Peer review feedback: simplify thread local setup and remove a bunch …
smellsblue Jan 3, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions ant-ext-src/com/on_site/fasthat/ant/EachPomDependencyTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ private List<Dependency> parsePom() throws BuildException {
NodeList nodes = (NodeList) xpath.evaluate("/project/dependencies/dependency", root, XPathConstants.NODESET);

for (int i = 0; i < nodes.getLength(); i++) {
result.add(new Dependency(xpath, (Element) nodes.item(i)));
Dependency dependency = new Dependency(xpath, (Element) nodes.item(i));

if (!dependency.isTestScope()) {
result.add(dependency);
}
}

return result;
Expand All @@ -89,17 +93,36 @@ private static class Dependency {
private final String groupId;
private final String artifactId;
private final String version;
private final String scope;

public Dependency(XPath xpath, Element element) throws BuildException {
this.groupId = getNodeText(xpath, "groupId", element);
this.artifactId = getNodeText(xpath, "artifactId", element);
this.version = getNodeText(xpath, "version", element);
this.scope = getOptionalNodeText(xpath, "scope", element);
}

public boolean isTestScope() {
return "test".equals(scope);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"test".equals(scope) is mildly deprecated, because it's hard for humans to decipher the intent. I tend to prefer to signal my intent directly:

  1. If scope can contain null as a valid value, use Objects.equals(scope, "test").
  2. If null is not a valid value, just use scope.equals("test").

}

private String getOptionalNodeText(XPath xpath, String query, Element element) throws BuildException {
Element node = getNode(xpath, query, element);

if (node == null) {
return null;
}

return node.getTextContent().trim();
}

private String getNodeText(XPath xpath, String query, Element element) throws BuildException {
return getNode(xpath, query, element).getTextContent().trim();
}

private Element getNode(XPath xpath, String query, Element element) throws BuildException {
try {
Element node = (Element) xpath.evaluate(query, element, XPathConstants.NODE);
return node.getTextContent().trim();
return (Element) xpath.evaluate(query, element, XPathConstants.NODE);
} catch (Exception e) {
throw new BuildException("Error running XPath query: " + query, e);
}
Expand Down
5 changes: 3 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
</target>

<!-- The actual build -->
<property name="src" value="src"/>
<property name="src" value="src/main/java"/>
<property name="resources" value="src/main/resources"/>
<property name="build" value="${base.build}/java"/>
<property name="lib" value="lib"/>
<property name="bin" value="bin"/>
Expand Down Expand Up @@ -59,7 +60,7 @@

<target name="copy-resources" depends="init">
<copy todir="${build}/com/sun/tools/hat/resources">
<fileset dir="${src}/com/sun/tools/hat/resources"/>
<fileset dir="${resources}/com/sun/tools/hat/resources"/>
</copy>
</target>

Expand Down
62 changes: 52 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.on_site</groupId>
<artifactId>fasthat</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -22,6 +16,43 @@
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<index>true</index>
<manifest>
<mainClass>com.sun.tools.hat.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<executions>
<execution>
<id>bundle-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.sun.tools.hat.Main</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
Expand All @@ -30,5 +61,16 @@
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId>
<version>0.9.2</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
148 changes: 0 additions & 148 deletions src/com/sun/tools/hat/internal/server/AllClassesQuery.java

This file was deleted.

Loading