Skip to content

Commit

Permalink
disable the usage stat collection during the development
Browse files Browse the repository at this point in the history
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18253 71c3de6d-444a-0410-be80-ed276b4c234a
  • Loading branch information
kohsuke committed May 21, 2009
1 parent 78169fa commit 10cc044
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/hudson/model/UsageStatistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public UsageStatistics(String keyImage) {
*/
public boolean isDue() {
// user opted out. no data collection.
if(!Hudson.getInstance().isUsageStatisticsCollected()) return false;
if(!Hudson.getInstance().isUsageStatisticsCollected() || DISABLED) return false;

long now = System.currentTimeMillis();
if(now - lastAttempt > DAY) {
Expand Down Expand Up @@ -228,4 +228,6 @@ public CombinedCipherInputStream(InputStream in, Cipher asym, String algorithm,
private static final String DEFAULT_KEY_BYTES = "30819f300d06092a864886f70d010101050003818d0030818902818100c14970473bd90fd1f2d20e4fa6e36ea21f7d46db2f4104a3a8f2eb097d6e26278dfadf3fe9ed05bbbb00a4433f4b7151e6683a169182e6ff2f6b4f2bb6490b2cddef73148c37a2a7421fc75f99fb0fadab46f191806599a208652f4829fd6f76e13195fb81ff3f2fce15a8e9a85ebe15c07c90b34ebdb416bd119f0d74105f3b0203010001";

private static final long DAY = DAYS.toMillis(1);

public static boolean DISABLED = Boolean.getBoolean(UsageStatistics.class.getName()+".disable");
}
5 changes: 5 additions & 0 deletions war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ THE SOFTWARE.
<name>hudson.bundled.plugins</name>
<value>${basedir}/../maven-plugin/target/test-classes/the.hpl</value>
</systemProperty>
<systemProperty>
<!-- stat collection pointless -->
<name>hudson.model.UsageStatistics.disabled</name>
<value>true</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
Expand Down

0 comments on commit 10cc044

Please sign in to comment.