Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Configuring Travis

  • Loading branch information...
commit 559217778abeee25f66f47ac934bbe3221eae61a 1 parent 9fb88a9
@luiz luiz authored
Showing with 10 additions and 8 deletions.
  1. +1 −0  .travis.yml
  2. +9 −8 README.markdown
View
1  .travis.yml
@@ -0,0 +1 @@
+language: java
View
17 README.markdown
@@ -1,4 +1,5 @@
## vraptor-dash
+![Build status](https://secure.travis-ci.org/caelum/vraptor-dash.png)
A dashboard with several tools for your vraptor project.
@@ -20,21 +21,21 @@ Add the entity to your hibernate.cfg.xml:
br.com.caelum.vraptor.dash.statement.Statement
br.com.caelum.vraptor.dash.uristats.Stat
-
+
Create a component that implements StatementAwareUser:
@Component
public class StatementCheck implements StatementAwareUser, IdeableUser {
-
+
private final User user;
public StatementCheck(User user) {
this.user = user;
}
-
+
public Serializable getId() {
return user.getId();
}
-
+
public boolean canCreateStatements() {
return true; // this is the admin user who is capable of seeing all statements and creating new ones. this is "GOD"
}
@@ -60,7 +61,7 @@ And annotate your method with the parameters to be logged:
public void edit(Client client) {
...
}
-
+
Remember that you need the logged in user to implement the interface IdeableUser
# Optimizing cache strategies
@@ -77,7 +78,7 @@ Add the following filter to your web.xml and remember to configure DashUriStat:
<url-pattern>/*</url-pattern>
</filter-mapping>
-Now the Stat object has the fields *size*, *etag*.
+Now the Stat object has the fields *size*, *etag*.
If hasEtag = false, the etag is automatically generated (but not returned to the client). So now its possible to check how much kbytes and seconds one could save from using cache in not-yet-cached pages:
select uri, verb, etag, size*(count(uri)-1)/1024, time*(count(uri)-1)/1000 from DashUriStat where hasEtag=false and (cache is null or cache=="") group by uri, verb, etag
@@ -85,9 +86,9 @@ If hasEtag = false, the etag is automatically generated (but not returned to the
Per method, which shows how important it is to improve one method:
select resource, method, (sum(size)- (select sum(avg(d.size)) from DashUriStat as d where d.resource=resource and d.method=method group by etag, sum(avg(d.size))) )/1024 as ssss,(sum(time)-avg(time))/1000 as tttt from DashUriStat where cache = '' and hadEtag = 'false' and verb='GET' group by resource, method order by resource, method
-
+
Analyze where you can gain the most and optimize it.
# Help
-Get help at VRaptor's mailing list
+Get help at VRaptor's mailing list
Please sign in to comment.
Something went wrong with that request. Please try again.