Skip to content

Commit

Permalink
And more restructuring for remote collection
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Oct 10, 2015
1 parent 083c4a3 commit 300338e
Show file tree
Hide file tree
Showing 748 changed files with 1,518 additions and 1,625 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,21 @@ Building requires Java 7+ (in order to perform [Immutables](https://immutables.g

Glowroot uses [Immutables](https://immutables.github.io) annotation processing to eliminate maintenance on lots of boilerplate code. If you are using Eclipse, this requires installing the [m2e-apt](https://github.com/jbosstools/m2e-apt) plugin and changing Window > Preferences > Maven > Annotation Processing to "Automatically configure JDT APT".

To work on the UI, run org.glowroot.sandbox.ui.UiSandboxMain under a debugger inside your favorite IDE. This starts Glowroot and generates a variety of sample traces to give the UI something to display. Connect your browser to http://localhost:4000.
To work on the UI, run org.glowroot.ui.sandbox.UiSandboxMain under a debugger inside your favorite IDE. This starts Glowroot and generates a variety of sample traces to give the UI something to display. Connect your browser to http://localhost:4000.

Also, Glowroot uses [Bower](http://bower.io) and [Grunt](http://gruntjs.com) to build its web assets (dependency management, Javascript concat/minify, LESS compile/uncss/minify, AngularJS template concat/minify, asset revving and more). The first time you run `mvn clean install`, Node, Bower and Grunt are installed locally under `<repo>/core/node` (thanks to the [frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin)).
Also, Glowroot uses [Bower](http://bower.io) and [Grunt](http://gruntjs.com) to build its web assets (dependency management, Javascript concat/minify, LESS compile/uncss/minify, AngularJS template concat/minify, asset revving and more). The first time you run `mvn clean install`, Node, Bower and Grunt are installed locally under `<repo>/ui-parent/ui/node` (thanks to the [frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin)).

If you are modifying web assets, you either need to run grunt to re-build them after each change, or (better) run `grunt serve` from the `<repo>/core` directory and connect your browser to http://localhost:9000.
If you are modifying web assets, you either need to run grunt to re-build them after each change, or (better) run `grunt serve` from the `<repo>/ui-parent/ui` directory and connect your browser to http://localhost:9000.

`grunt serve` serves up the Glowroot web assets to the browser without the concat/minify/rev step, which makes testing/debugging much easier. It reverse proxies non- static resource requests to http://localhost:4000 to be handled by Glowroot. It also watches for changes to the files and performs live-reload of web assets inside the browser.

## Microbenchmarks

Microbenchmarks are written using the excellent [JMH](http://openjdk.java.net/projects/code-tools/jmh/) benchmark harness, and can be built and run using
Microbenchmarks are written using the excellent [JMH](http://openjdk.java.net/projects/code-tools/jmh/) benchmark harness. The microbenchmarks can be built and run under [agent-parent/benchmarks](agent-parent/benchmarks):

mvn clean package
java -jar target/benchmarks.jar -jvmArgs -javaagent:path/to/glowroot.jar

from the following locations:

* [testing/microbenchmarks](testing/microbenchmarks)
* [plugins/servlet-plugin-microbenchmarks](plugins/servlet-plugin-microbenchmarks)
* [plugins/jdbc-plugin-microbenchmarks](plugins/jdbc-plugin-microbenchmarks)

## Overhead

Monitoring overhead depends on many factors, but is generally in the low microseconds per transaction. See [https://glowroot.org/overhead.html](https://glowroot.org/overhead.html) for a concrete benchmark and results.
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions agent/core/pom.xml → agent-parent/agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<relativePath>../..</relativePath>
</parent>

<artifactId>glowroot-agent-core</artifactId>
<artifactId>glowroot-agent</artifactId>

<name>Glowroot Agent Core</name>
<description>Glowroot Agent Core</description>
<name>Glowroot Agent</name>
<description>Glowroot Agent</description>

<properties>
<asm.version>5.0.4</asm.version>
Expand Down Expand Up @@ -295,7 +295,7 @@
java util logging from being initialized early (e.g. in the case of wildfly which
wants to do some setup before jul is initialized) -->
<pattern>java.util.logging</pattern>
<shadedPattern>org.glowroot.agent.core.jul</shadedPattern>
<shadedPattern>org.glowroot.agent.jul</shadedPattern>
<excludes>
<!-- don't shade the system property key "java.util.logging.manager"
(unshaded string is needed in LazyPlatformMBeanServer) -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;
import java.io.IOException;
Expand All @@ -32,34 +32,34 @@
import org.slf4j.LoggerFactory;

import org.glowroot.agent.api.internal.GlowrootService;
import org.glowroot.agent.core.config.ConfigService;
import org.glowroot.agent.core.config.PluginCache;
import org.glowroot.agent.core.impl.AdviceCache;
import org.glowroot.agent.core.impl.Aggregator;
import org.glowroot.agent.core.impl.ConfigServiceImpl;
import org.glowroot.agent.core.impl.GlowrootServiceImpl;
import org.glowroot.agent.core.impl.ServiceRegistryImpl;
import org.glowroot.agent.core.impl.ServiceRegistryImpl.ConfigServiceFactory;
import org.glowroot.agent.core.impl.TimerNameCache;
import org.glowroot.agent.core.impl.TransactionCollector;
import org.glowroot.agent.core.impl.TransactionRegistry;
import org.glowroot.agent.core.impl.TransactionServiceImpl;
import org.glowroot.agent.core.impl.UserProfileScheduler;
import org.glowroot.agent.core.impl.WeavingTimerServiceImpl;
import org.glowroot.agent.core.live.LiveAggregateRepositoryImpl;
import org.glowroot.agent.core.live.LiveJvmServiceImpl;
import org.glowroot.agent.core.live.LiveThreadDumpServiceImpl;
import org.glowroot.agent.core.live.LiveTraceRepositoryImpl;
import org.glowroot.agent.core.live.LiveWeavingServiceImpl;
import org.glowroot.agent.core.util.LazyPlatformMBeanServer;
import org.glowroot.agent.core.util.OptionalService;
import org.glowroot.agent.core.util.ThreadAllocatedBytes;
import org.glowroot.agent.core.util.Tickers;
import org.glowroot.agent.core.weaving.AnalyzedWorld;
import org.glowroot.agent.core.weaving.ExtraBootResourceFinder;
import org.glowroot.agent.core.weaving.WeavingClassFileTransformer;
import org.glowroot.agent.core.weaving.WeavingTimerService;
import org.glowroot.agent.config.ConfigService;
import org.glowroot.agent.config.PluginCache;
import org.glowroot.agent.impl.AdviceCache;
import org.glowroot.agent.impl.Aggregator;
import org.glowroot.agent.impl.ConfigServiceImpl;
import org.glowroot.agent.impl.GlowrootServiceImpl;
import org.glowroot.agent.impl.ServiceRegistryImpl;
import org.glowroot.agent.impl.ServiceRegistryImpl.ConfigServiceFactory;
import org.glowroot.agent.impl.TimerNameCache;
import org.glowroot.agent.impl.TransactionCollector;
import org.glowroot.agent.impl.TransactionRegistry;
import org.glowroot.agent.impl.TransactionServiceImpl;
import org.glowroot.agent.impl.UserProfileScheduler;
import org.glowroot.agent.impl.WeavingTimerServiceImpl;
import org.glowroot.agent.live.LiveAggregateRepositoryImpl;
import org.glowroot.agent.live.LiveJvmServiceImpl;
import org.glowroot.agent.live.LiveThreadDumpServiceImpl;
import org.glowroot.agent.live.LiveTraceRepositoryImpl;
import org.glowroot.agent.live.LiveWeavingServiceImpl;
import org.glowroot.agent.plugin.api.transaction.TransactionService;
import org.glowroot.agent.util.LazyPlatformMBeanServer;
import org.glowroot.agent.util.OptionalService;
import org.glowroot.agent.util.ThreadAllocatedBytes;
import org.glowroot.agent.util.Tickers;
import org.glowroot.agent.weaving.AnalyzedWorld;
import org.glowroot.agent.weaving.ExtraBootResourceFinder;
import org.glowroot.agent.weaving.WeavingClassFileTransformer;
import org.glowroot.agent.weaving.WeavingTimerService;
import org.glowroot.common.config.PluginDescriptor;
import org.glowroot.common.live.LiveAggregateRepository;
import org.glowroot.common.live.LiveJvmService;
Expand Down Expand Up @@ -204,7 +204,7 @@ public org.glowroot.agent.plugin.api.config.ConfigService create(String pluginId
threadAllocatedBytes.getAvailability());

// using context class loader in LocalContainer tests so that the plugins are instantiated
// inside org.glowroot.agent.harness.impl.IsolatedClassLoader
// inside org.glowroot.agent.it.harness.impl.IsolatedClassLoader
ClassLoader initPluginClassLoader =
instrumentation == null ? Thread.currentThread().getContextClassLoader()
: AgentModule.class.getClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -42,12 +42,12 @@ public static void premain(@SuppressWarnings("unused") String agentArgs,
Class<?> mainEntryPointClass;
if (glowrootJarFile == null) {
// this is ok, running integration test in IDE
mainEntryPointClass = Class.forName("org.glowroot.agent.core.MainEntryPoint", true,
mainEntryPointClass = Class.forName("org.glowroot.agent.MainEntryPoint", true,
AgentPremain.class.getClassLoader());
} else {
instrumentation.appendToBootstrapClassLoaderSearch(new JarFile(glowrootJarFile));
mainEntryPointClass =
Class.forName("org.glowroot.agent.core.MainEntryPoint", true, null);
Class.forName("org.glowroot.agent.MainEntryPoint", true, null);
}
Method premainMethod = mainEntryPointClass.getMethod("premain",
new Class<?>[] {Instrumentation.class, File.class});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.Closeable;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.lang.reflect.Method;
import java.util.List;
Expand Down Expand Up @@ -43,10 +43,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.glowroot.agent.core.config.ConfigService;
import org.glowroot.agent.core.util.LazyPlatformMBeanServer;
import org.glowroot.agent.core.util.LazyPlatformMBeanServer.InitListener;
import org.glowroot.agent.core.util.Reflections;
import org.glowroot.agent.config.ConfigService;
import org.glowroot.agent.util.LazyPlatformMBeanServer;
import org.glowroot.agent.util.LazyPlatformMBeanServer.InitListener;
import org.glowroot.agent.util.Reflections;
import org.glowroot.common.config.GaugeConfig;
import org.glowroot.common.config.GaugeConfig.MBeanAttribute;
import org.glowroot.common.util.Clock;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;
import java.lang.instrument.Instrumentation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.Closeable;
import java.io.File;
Expand All @@ -35,8 +35,8 @@
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ThreadFactoryBuilder;

import org.glowroot.agent.core.util.Tickers;
import org.glowroot.agent.core.weaving.PreInitializeWeavingClasses;
import org.glowroot.agent.util.Tickers;
import org.glowroot.agent.weaving.PreInitializeWeavingClasses;
import org.glowroot.common.util.Clock;

import static com.google.common.base.Preconditions.checkNotNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.util.concurrent.ScheduledExecutorService;

Expand All @@ -22,11 +22,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.glowroot.agent.core.config.ConfigService;
import org.glowroot.agent.core.impl.TransactionCollector;
import org.glowroot.agent.core.impl.TransactionRegistry;
import org.glowroot.agent.core.model.Transaction;
import org.glowroot.agent.core.util.Tickers;
import org.glowroot.agent.config.ConfigService;
import org.glowroot.agent.impl.TransactionCollector;
import org.glowroot.agent.impl.TransactionRegistry;
import org.glowroot.agent.model.Transaction;
import org.glowroot.agent.util.Tickers;
import org.glowroot.common.util.ScheduledRunnable;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;

Expand All @@ -25,7 +25,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.glowroot.agent.core.util.SpyingLogbackFilter;
import org.glowroot.agent.util.SpyingLogbackFilter;
import org.glowroot.common.util.OnlyUsedByTests;

public class LoggingInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;
import java.lang.instrument.Instrumentation;
Expand All @@ -30,7 +30,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.glowroot.agent.core.DataDirLocking.BaseDirLockedException;
import org.glowroot.agent.DataDirLocking.BaseDirLockedException;
import org.glowroot.common.util.OnlyUsedByTests;

public class MainEntryPoint {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
Expand All @@ -27,9 +27,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.glowroot.agent.core.config.ConfigService;
import org.glowroot.agent.core.impl.TransactionRegistry;
import org.glowroot.agent.core.model.Transaction;
import org.glowroot.agent.config.ConfigService;
import org.glowroot.agent.impl.TransactionRegistry;
import org.glowroot.agent.model.Transaction;
import org.glowroot.agent.plugin.api.config.ConfigListener;
import org.glowroot.common.util.OnlyUsedByTests;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.IOException;
import java.io.InputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core;
package org.glowroot.agent;

import java.io.File;
import java.util.List;

import javax.annotation.Nullable;

import org.glowroot.agent.core.config.ConfigService;
import org.glowroot.agent.core.config.PluginCache;
import org.glowroot.agent.core.live.LiveJvmServiceImpl;
import org.glowroot.agent.core.util.LazyPlatformMBeanServer;
import org.glowroot.agent.core.util.OptionalService;
import org.glowroot.agent.core.util.ThreadAllocatedBytes;
import org.glowroot.agent.config.ConfigService;
import org.glowroot.agent.config.PluginCache;
import org.glowroot.agent.live.LiveJvmServiceImpl;
import org.glowroot.agent.util.LazyPlatformMBeanServer;
import org.glowroot.agent.util.OptionalService;
import org.glowroot.agent.util.ThreadAllocatedBytes;
import org.glowroot.common.config.PluginDescriptor;
import org.glowroot.common.live.LiveJvmService;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.glowroot.agent.core.advicegen;
package org.glowroot.agent.advicegen;

import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.Method;

import javax.annotation.Nullable;

import org.glowroot.agent.core.util.Reflections;
import org.glowroot.agent.util.Reflections;

import static com.google.common.base.Preconditions.checkNotNull;

Expand Down

0 comments on commit 300338e

Please sign in to comment.