Skip to content

Commit

Permalink
Beautification of templates
Browse files Browse the repository at this point in the history
  • Loading branch information
amalakar committed Apr 15, 2013
1 parent 2211965 commit d0f5328
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.hcatalog.hcatmix.publisher.HCatMixFormatter;
import org.apache.hcatalog.hcatmix.publisher.ResultsPublisher;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.tools.generic.DateTool;

import java.util.List;

Expand All @@ -39,6 +40,7 @@ public LoadTestResultsPublisher(List<LoadTestStatistics> allStats, final String
VelocityContext context = new VelocityContext();
context.put("loadTestAllResults", allStats);
context.put("formatter", new HCatMixFormatter());
context.put("dateTool", new DateTool());
super.setContext(context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.hcatalog.hcatmix.publisher.HCatMixFormatter;
import org.apache.hcatalog.hcatmix.publisher.ResultsPublisher;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.tools.generic.DateTool;

import java.util.List;

Expand All @@ -38,6 +39,7 @@ public LoadStoreResultsPublisher(List<LoadStoreTestStatistics> allStats, final S
VelocityContext context = new VelocityContext();
context.put("hcatStats", allStats);
context.put("formatter", new HCatMixFormatter());
context.put("dateTool", new DateTool());
super.setContext(context);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ task.class.names=org.apache.hcatalog.hcatmix.load.tasks.HCatAddPartitionTask
num.mappers=20

# How many threds to increase at the end of fixed interval
thread.increment.count=4
thread.increment.count=1

# The interval at which number of threads are increased
thread.increment.interval.minutes=1

# For how long the map would run
map.runtime.minutes=25
map.runtime.minutes=10

# Extra wait time to let the individual tasks to finish
thread.completion.buffer.minutes=1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void testGraphURL() throws Exception {
// See that no exception is thrown
List<LoadTestStatistics> loadTestStats = new ArrayList<LoadTestStatistics>();
loadTestStats.add(new LoadTestStatistics("dummy.properties", timeSeries));
LoadTestResultsPublisher publisher = new LoadTestResultsPublisher(loadTestStats, "TODO");
LoadTestResultsPublisher publisher = new LoadTestResultsPublisher(loadTestStats, "/tmp/hcatmix_load_test_all_results.html");
publisher.publishAll();
}

Expand Down
3 changes: 2 additions & 1 deletion hcatmix/src/test/resources/loadstore_html_template.vm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<img src="$hcatStat.ChartUrl" alt="HCatMix Chart" class="img-polaroid" />
#set ($map = $hcatStat.timedStats.statisticsByTag )
<p>
<table class="table">
<table class="table table-bordered table-striped">
<thead>
<caption>Load and Store times for $hcatStat.FileName</caption>
<tr>
Expand Down Expand Up @@ -45,5 +45,6 @@
#end

</div>
<footer class="footer">Report generated at: $dateTool.getDate()</footer>
</body>
</html>
13 changes: 6 additions & 7 deletions hcatmix/src/test/resources/loadtest_html_template.vm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<body>

<div class="container">
<h1>Response time of various HCatalog calls as the number of clients are increased</h1>
<h3>Response time of various HCatalog calls as the number of clients are increased</h3>
#foreach( $loadTestResults in $loadTestAllResults )
<div class="result">
<h6>$loadTestResults.FileName</h6>
Expand All @@ -17,10 +17,9 @@

#foreach($method in $testMethods)
<p>
<h4>$method</h4>
<table class="table">
<table class="table table-bordered table-striped">
<thead>
<caption>Graph</caption>
<caption>$method</caption>
<tr>
<th>Thread Count</th>
<th>Avg</th>
Expand Down Expand Up @@ -63,10 +62,10 @@
#end
#else
<p>There is no result to display</p>
</div>
#end


<hr/>
</div>
<footer class="footer">Report generated at: $dateTool.getDate()</footer>
</div>
#end
</body>
Expand Down

0 comments on commit d0f5328

Please sign in to comment.