Spencer's selections are not Turing complete. This means that some you will never be able to use Spencer for every single use case. For special use cases, Spencer provides an API that lets you write your own analysis on top of Spencer's queries. The API knows three commands: getting all available data sets, selecting objects and getting meta information. If you build a query using Spencer's UI, you will always find links to the API calls that will give you the relevant data at the bottom of each page, for instance, see: the query for immutable objects. Note that these queries generally contain the name of a dataset. On this page, we will consistently the test dataset (which you should use for experiments, as it's smaller and therefore faster to give replies). Features that the API does not (yet!) expose are a way to access the class files that were running in a benchmark and a way to retrieve all events involving one or several objects, like on the /apropos pages, for example: /apropos/test/36757
In order to run a selection query using the JSON API, access this URL (note that spaces are escaped using the control sequence %20):
You can also use tools like curl (on unix) to get the results in your command line, run:
Percentages of objects selected by a query
To get the percentage of objects (out of all objects) that pass a given query, use:
Note that this works only for a single query, not composite queries separated by slashes.
Getting Meta Information
Selection only gives you sets of objects, but it tells you nothing about the classes, life times, ... of these objects. This is what the meta information is for. Use the URL