remove support module

This commit is contained in:
Sebastian Sdorra
2014-07-06 21:39:51 +02:00
parent 14cd134ec5
commit dc6960ca50
8 changed files with 0 additions and 596 deletions

View File

@@ -74,7 +74,6 @@
<module>scm-server</module>
<module>scm-plugin-backend</module>
<module>scm-clients</module>
<module>scm-support</module>
</modules>
<repositories>

View File

@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>sonia.scm</groupId>
<artifactId>scm</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>sonia.scm.support</groupId>
<artifactId>scm-support</artifactId>
<packaging>pom</packaging>
<version>2.0.0-SNAPSHOT</version>
<name>scm-support</name>
<modules>
<module>scm-support-btrace</module>
</modules>
</project>

View File

@@ -1,86 +0,0 @@
/**
* Copyright (c) 2010, Sebastian Sdorra
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of SCM-Manager; nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* http://bitbucket.org/sdorra/scm-manager
*
*/
// see https://bitbucket.org/sdorra/scm-manager/issue/345/ehcache-eating-up-all-memory
def humanReadable(def bytes) {
if (bytes < 1024) return bytes + " B";
int exp = (int) (Math.log(bytes) / Math.log(1024));
String pre = "KMGTPE".charAt(exp-1);
return String.format("%.1f %sB", bytes / Math.pow(1024, exp), pre);
}
def sizeOf(Serializable object){
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(object);
oos.close();
return baos.size();
}
Runtime runtime = Runtime.getRuntime();
def maxMemory = runtime.maxMemory();
def allocatedMemory = runtime.totalMemory();
def freeMemory = runtime.freeMemory();
println "memory:"
println " - max : " + humanReadable(maxMemory);
println " - allocated : " + humanReadable(allocatedMemory);
println " - free : " + humanReadable(freeMemory);
println "";
println "";
def cacheManager = injector.getInstance(sonia.scm.cache.CacheManager.class).cacheManager;
def totalCMax = 0;
def cacheNames = cacheManager.getCacheNames();
for ( def cacheName : cacheNames ){
def cache = cacheManager.getCache(cacheName);
def totalMemory = cache.calculateInMemorySize();
def average = cache.getSize() > 0 ? Math.round( totalMemory / cache.getSize() ) : 0;
def max = cache.getCacheConfiguration().getMaxEntriesLocalHeap();
def maxSize = average * max;
totalCMax += maxSize;
println cache.name + ":";
println " - size : " + cache.getSize();
println " - maxsize : " + max;
println " - average : " + humanReadable( average );
println " - current : " + humanReadable( totalMemory );
println " - cmax : " + humanReadable( maxSize );
}
println "";
println "";
println "Total CMax: " + humanReadable(totalCMax);

View File

@@ -1,59 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>sonia.scm.support</groupId>
<artifactId>scm-support</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>sonia.scm</groupId>
<artifactId>scm-support-btrace</artifactId>
<version>2.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>scm-support-btrace</name>
<dependencies>
<dependency>
<groupId>sonia.scm</groupId>
<artifactId>scm-core</artifactId>
<version>2.0.0-SNAPSHOT</version>
</dependency>
<!-- servlet api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
<!-- btrace -->
<dependency>
<groupId>com.sun.tools.btrace</groupId>
<artifactId>btrace-boot</artifactId>
<version>${btrace.version}</version>
</dependency>
<dependency>
<groupId>com.sun.tools.btrace</groupId>
<artifactId>btrace-client</artifactId>
<version>${btrace.version}</version>
</dependency>
<dependency>
<groupId>com.sun.tools.btrace</groupId>
<artifactId>btrace-agent</artifactId>
<version>${btrace.version}</version>
</dependency>
</dependencies>
<properties>
<btrace.version>1.2.3</btrace.version>
</properties>
</project>

View File

@@ -1,235 +0,0 @@
/**
* Copyright (c) 2010, Sebastian Sdorra
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of SCM-Manager; nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* http://bitbucket.org/sdorra/scm-manager
*
*/
package sonia.scm.btrace;
//~--- JDK imports ------------------------------------------------------------
import com.sun.btrace.annotations.BTrace;
import com.sun.btrace.annotations.Kind;
import com.sun.btrace.annotations.Location;
import com.sun.btrace.annotations.OnMethod;
import java.io.IOException;
import java.io.Writer;
import java.util.Map;
import static com.sun.btrace.BTraceUtils.*;
/**
*
* @author Sebastian Sdorra
*/
@BTrace
public class IndexPage
{
/** Field description */
private static String space = "";
/** Field description */
private static boolean renderMapEntries = false;
//~--- methods --------------------------------------------------------------
/**
* Method description
*
*/
@OnMethod(clazz = "sonia.scm.boot.BootstrapFilter", method = "doFilter")
public static void onEnterBootstrapFilter()
{
printSpacedLine("enter BootstrapFilter");
incSpace();
}
/**
* Method description
*
*
* @param request
*/
@OnMethod(clazz = "sonia.scm.filter.GZipFilter", method = "doFilter")
public static void onEnterGzipFilter()
{
printSpacedLine("Enter GZipFilter");
incSpace();
}
/**
* Method description
*
*/
@OnMethod(clazz = "sonia.scm.template.TemplateServlet", method = "doGet")
public static void onEnterTemplateSevlet()
{
renderMapEntries = true;
printSpacedLine("enter TemplateServlet");
incSpace();
}
/**
* Method description
*
*/
@OnMethod(
clazz = "sonia.scm.boot.BootstrapFilter",
method = "doFilter",
location = @Location(Kind.RETURN)
)
public static void onExitBootstrapFilter()
{
decSpace();
printSpacedLine("exit BootstrapFilter");
}
/**
* Method description
*
*/
@OnMethod(
clazz = "sonia.scm.filter.GZipFilter",
method = "doFilter",
location = @Location(Kind.RETURN)
)
public static void onExitGzipFilter()
{
decSpace();
printSpacedLine("Exit GZipFilter");
}
/**
* Method description
*
*
* @param templateName
* @param writer
* @param params
*/
@OnMethod(
clazz = "sonia.scm.template.FreemarkerTemplateHandler",
method = "render",
location = @Location(Kind.RETURN)
)
public static void onExitTemplate(String templateName, Writer writer,
Map<String, ? extends Object> params)
{
printSpacedLine(strcat("exit template: ", templateName));
decSpace();
}
/**
* Method description
*
*/
@OnMethod(
clazz = "sonia.scm.template.TemplateServlet",
method = "doGet",
location = @Location(Kind.RETURN)
)
public static void onExitTemplateSevlet()
{
decSpace();
printSpacedLine("exit TemplateServlet");
renderMapEntries = false;
}
/**
* Method description
*
*
* @param key
* @param value
*
* @throws IOException
*/
@OnMethod(clazz = "java.util.HashMap", method = "put")
public static void onHashMapPut(Object key, Object value) throws IOException
{
if (renderMapEntries)
{
String msg = strcat(" ", str(key));
msg = strcat(msg, " = ");
msg = strcat(msg, str(value));
printSpacedLine(msg);
}
}
/**
* Method description
*
*
* @param templateName
* @param writer
* @param params
*/
@OnMethod(clazz = "sonia.scm.template.FreemarkerTemplateHandler",
method = "render")
public static void onRenderTemplate(String templateName, Writer writer,
Map<String, ? extends Object> params)
{
incSpace();
printSpacedLine(strcat("render template: ", templateName));
}
/**
* Method description
*
*/
private static void decSpace()
{
space = Strings.substr(space, 1);
}
/**
* Method description
*
*/
private static void incSpace()
{
space = strcat(space, " ");
}
/**
* Method description
*
*
* @param text
*/
private static void printSpacedLine(String text)
{
println(strcat(space, text));
}
}

View File

@@ -1,55 +0,0 @@
/**
* Copyright (c) 2010, Sebastian Sdorra
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of SCM-Manager; nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* http://bitbucket.org/sdorra/scm-manager
*
*/
vm.breakpoint("org.eclipse.jgit.lib.Repository", 133){
println "open repository " + gitDir;
}
vm.breakpoint("org.eclipse.jgit.lib.Repository", 808){
println " open repository, counter: " + useCnt.get();
}
vm.breakpoint("org.eclipse.jgit.lib.Repository", 812){
println " close repository, counter: " + useCnt.get();
}
vm.breakpoint("org.eclipse.jgit.lib.Repository", 813){
println "close repository";
}
vm.breakpoint("org.eclipse.jgit.revwalk.RevWalk", 215){
println " open revwalk";
}
vm.breakpoint("org.eclipse.jgit.revwalk.RevWalk", 239){
println " release revwalk";
}

View File

@@ -1,43 +0,0 @@
/**
* Copyright (c) 2010, Sebastian Sdorra
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of SCM-Manager; nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* http://bitbucket.org/sdorra/scm-manager
*
*/
vm.breakpoint("sonia.scm.web.GitReceiveHook", 133){
println "GitReceiveHook:133: fire hook event for git repository " + repositoryName;
println "GitReceiveHook:133: the repository is located at " + repository.getDirectory().getPath();
}
vm.breakpoint("sonia.scm.repository.RepositoryUtil", 244){
println "RepositoryUtil:244: baseDirectory=" + baseDirectory.getCanonicalPath() + ":" + directoryLength + ",directory=" + path + ":" + directoryLength;
}
vm.breakpoint("sonia.scm.repository.RepositoryUtil", 249){
println "RepositoryUtil:249: name with trimSeperatorChars = " + name;
}

View File

@@ -1,95 +0,0 @@
/**
* Copyright (c) 2010, Sebastian Sdorra
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of SCM-Manager; nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* http://bitbucket.org/sdorra/scm-manager
*
*/
vm.methodEntryBreakpoint("sonia.scm.template.TemplateServlet", "doGet"){
println "enter method doGet of sonia.scm.template.TemplateServlet";
}
vm.methodEntryBreakpoint("sonia.scm.template.FreemarkerTemplateHandler", "render"){
println "enter method render of sonia.scm.template.FreemarkerTemplateHandler";
}
vm.breakpoint("sonia.scm.template.TemplateServlet", 150){
println "call templateHandler.render";
}
vm.breakpoint("sonia.scm.template.FreemarkerTemplateHandler", 136){
println "try to render template " + templateName;
println "params:";
println " " + params;
println "writer:"
println " " + writer;
}
vm.breakpoint("sonia.scm.template.FreemarkerTemplateHandler", 138){
if ( template == null ){
println "could not find template " + templateName;
} else {
println "found template " + templateName;
}
}
def fthEbp = null;
vm.breakpoint("sonia.scm.template.FreemarkerTemplateHandler", 147){
println "start rendering " + templateName;
fthEbp = vm.exceptionBreakpoint("java.lang.Exception"){ e ->
e.dumpStackTrace(System.out);
if ( fthEbp != null ){
fthEbp.delete();
}
}
}
vm.breakpoint("sonia.scm.template.FreemarkerTemplateHandler", 149){
println "catch exception of render method";
}
vm.breakpoint("sonia.scm.template.FreemarkerTemplateHandler", 151){
println "log exception " + ex.getMessage();
}
vm.breakpoint("sonia.scm.template.FreemarkerTemplateHandler", 153){
println "wrap exception " + ex.getMessage();
}
vm.methodExitBreakpoint("sonia.scm.template.FreemarkerTemplateHandler", "render"){
println "exit method render of sonia.scm.template.FreemarkerTemplateHandler";
}
vm.breakpoint("sonia.scm.template.TemplateServlet", 154){
println "close writer";
}
vm.methodExitBreakpoint("sonia.scm.template.TemplateServlet", "doGet"){
println "exit method doGet of sonia.scm.template.TemplateServlet";
}