-
Notifications
You must be signed in to change notification settings - Fork 108
UnderstandingTheCodebase
This code lives in caliper/src/main/java
Currently, there are two mostly-separate codebases sitting in there! The code that's directly in com.google.caliper
is the current "legacy" codebase that's about to be thrown out. The new codebase exists entirely in the various subpackages of com.google.caliper
.
These few classes are the only things that most users' benchmark classes will interact with. After the old codebase is gone, they'll move up a level to sit in com.google.caliper
.
These are dead-simple, easily-mappable-to-JSON classes that hold the result data that caliper produces. After a run, everything that caliper records (what was run, with what parameters, in what environment and vm, all the measurements that were gathered, etc.) is shoved into these classes and then converted to JSON for upload to the webapp.
This code makes up the Caliper "parent process" which is what you invoke directly from the command line when you run your benchmark. It does a lot of "coordination", but doesn't perform any actual measurements itself.
Some important classes:
This is the meat of the runner. It could stand to be decomposed a bit.
This class is the keeper of the knowledge about the structure of the user's benchmark class and how Caliper interacts with that.
This is where the command line gets parsed.
This implementation of Instrument
handles microbenchmark runtime measurements, as opposed to what the other instruments we'll add (soon?) will do, like measure memory allocation or consumption, or generate a profiling report, etc.
Random stuff we need that isn't very caliper-specific.
This is for the code that gets invoked in a subprocess by caliper. Ideally we should keep the dependencies as light as possible for this stuff.
Some important classes:
Contains the main() method the parent process invokes.
How the parent and worker processes talk to each other.
This is what actually runs and times your code! (Wondering when we'd ever get to that?)
This code lives in svn/cloud/src.
Jesse would love to tell you more here.... :-)