You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Using the data provider manager to access data providers](#using-the-data-provider-manager-to-access-data-providers)
46
-
-[Implementing a Data Provider Factory](#implementing-a-data-provider-factory)
47
-
-[Extension point](#extension-point)
48
-
-[Using data provider factories with experiments](#using-data-provider-factories-with-experiments)
49
45
-[Utilities](#utilities)
50
-
-[Registering a data provider factory programmatically](#registering-a-data-provider-factory-programmatically)
51
-
-[Implementing a facotry for single-instance data providers](#implementing-a-facotry-for-single-instance-data-providers)
46
+
-[Using the data provider manager to access data providers](#using-the-data-provider-manager-to-access-data-providers)
47
+
-[Implementing a Data Provider Factory](#implementing-a-data-provider-factory)
48
+
-[Extension point](#extension-point)
49
+
-[Using data provider factories with experiments](#using-data-provider-factories-with-experiments)
50
+
-[Registering a data provider factory programmatically](#registering-a-data-provider-factory-programmatically)
51
+
-[Implementing a factory for single-instance data providers](#implementing-a-factory-for-single-instance-data-providers)
52
52
-[Implementing a facotry for multi-instance data providers](#implementing-a-facotry-for-multi-instance-data-providers)
53
53
-[Grouping of data providers](#grouping-of-data-providers)
54
54
-[Implementing a data provider without analysis module](#implementing-a-data-provider-without-analysis-module)
55
-
-[Implementing a configurable data provider](#implementing-a-configurable-data-provider)
55
+
-[Implementing a configurable data provider](#implementing-a-configurable-data-provider)
56
56
-[Implementing a configuration source type](#implementing-a-configuration-source-type)
57
-
-[The configuration source type describes the input parameters to provide when to pass when creating a new data provider or global configuration.](#the-configuration-source-type-describes-the-input-parameters-to-provide-when-to-pass-when-creating-a-new-data-provider-or-global-configuration)
58
57
-[Implementing a configurable data provider without analysis module](#implementing-a-configurable-data-provider-without-analysis-module)
59
58
-[Implementing an `ITmfDataProviderConfigurator` without analysis module](#implementing-an-itmfdataproviderconfigurator-without-analysis-module)
60
59
-[Updating data provider factory for configurable data provider (without analysis module)](#updating-data-provider-factory-for-configurable-data-provider-without-analysis-module)
@@ -1312,7 +1311,11 @@ No parameters need to be added. Just pass an empty map.
1312
1311
|`table_search_expressions`| For searching providing a map <columnId, regular expression> Returned lines that match the search expression will be taggged by setting the highlight bit (8) in the properties bit mask of the return line model |
1313
1312
|`table_search_direction`| Optional, the search direction string NEXT or PREVIOUS. If omitted and `table_search_expressions` exists then NEXT will be used|
1314
1313
1315
-
## Using the data provider manager to access data providers
1314
+
### Utilities
1315
+
1316
+
Abstract base classes are provided for TreeXY and time graph data providers based on `TmfStateSystemAnalysisModule`s (`AbstractTreeCommonXDataProvider` and `AbstractTimeGraphDataProvider`, respectively). They handle concurrency, mapping of state system attributes to unique IDs, exceptions, caching and encapsulating the model in a response with the correct status.
1317
+
1318
+
### Using the data provider manager to access data providers
1316
1319
1317
1320
Data providers can be managed by the `DataProviderManager` class, which uses an [extension point](#extension-point) and factories for data providers. Factories can also programatically be registered (and deregistered) to (from) the `DataProviderManager`, see [here](#registering-a-data-provider-factory-programmatically for more details.
1318
1321
@@ -1399,7 +1402,7 @@ public class ExampleTimeGraphProviderFactory implements IDataProviderFactory {
1399
1402
}
1400
1403
}
1401
1404
```
1402
-
### Extension point
1405
+
####Extension point
1403
1406
This extension needs to be added to the plugin's plugin.xml file:
1404
1407
1405
1408
```xml
@@ -1415,7 +1418,7 @@ This extension needs to be added to the plugin's plugin.xml file:
1415
1418
</extension>
1416
1419
```
1417
1420
1418
-
### Using data provider factories with experiments
1421
+
####Using data provider factories with experiments
1419
1422
1420
1423
The Trace Compass framework allows to use the `DataProviderFactory` with single traces or experiments. The trace server will always create experiments even if a trace is a single trace.
1421
1424
@@ -1425,11 +1428,7 @@ In the data provider manager, experiments also get a unique instance of a data p
1425
1428
- the getDescriptor(ITmfTrace) returns only a single data provider descriptor for the same type
1426
1429
- it creates composite data provider instances (e.g. `TmfTimeGraphCompositeDataProvider`) with an array of data providers for each applicable sub-trace
1427
1430
1428
-
### Utilities
1429
-
1430
-
Abstract base classes are provided for TreeXY and time graph data providers based on `TmfStateSystemAnalysisModule`s (`AbstractTreeCommonXDataProvider` and `AbstractTimeGraphDataProvider`, respectively). They handle concurrency, mapping of state system attributes to unique IDs, exceptions, caching and encapsulating the model in a response with the correct status.
1431
-
1432
-
### Registering a data provider factory programmatically
1431
+
#### Registering a data provider factory programmatically
1433
1432
1434
1433
The most common way to register data provider factories is using the extension point as described above. However, the `DataProviderManager` has APIs to register and deregister factories programmatically. This allows to manage the lifecycle of custom data provider factories from extension code.
1435
1434
@@ -1445,7 +1444,7 @@ The most common way to register data provider factories is using the extension p
1445
1444
//..
1446
1445
```
1447
1446
1448
-
#### Implementing a facotry for single-instance data providers
1447
+
#### Implementing a factory for single-instance data providers
1449
1448
If you would like to create a `DataProviderFactory` for a data provider that is using one single analysis module, you can get the analysis module from the trace as shown in the example below.
1450
1449
1451
1450
```java
@@ -1582,7 +1581,7 @@ Data providers can be grouped under a common parent. A common parent is indicate
1582
1581
1583
1582
Data providers can use analysis modules, but they don't have to. For example, you can implement a data provider that gets the event statistics for the whole trace by reading all the events of a trace. See [Creating a Data Tree Data Provider](#creating-a-data-tree-data-provider) for an example.
1584
1583
1585
-
## Implementing a configurable data provider
1584
+
###Implementing a configurable data provider
1586
1585
1587
1586
Defining data providers statically as described in the previous chapters is not always flexible enough for user's needs. It's often required to create derived data providers from an existing data provider or data providers based on some configuration parameters. For example, it might be interesting to derive a CPU usage data provider from the original CPU usage data provider, that shows the CPU usage for a given CPU only. Another use case is to derive a virtual table data provider from the events table data provider, that shows only trace events with a certain event type.
1588
1587
@@ -1612,11 +1611,7 @@ The actual data provider needs to apply the configuration. The easiest way is to
1612
1611
1613
1612
### Implementing a configuration source type
1614
1613
1615
-
<<<<<<< HEAD
1616
1614
The configuration source type describes the input parameters to provide when to pass when creating a new data provider or global configuration.
1617
-
=======
1618
-
The configuration source type descibes the input parameters to provide when to pass when creating a new data provider or global configuration.
1619
-
>>>>>>> 222504c42f (doc: Add global configuration to trace-server developer guide)
1620
1615
1621
1616
The interface to implement is `ITmfConfigurationSourceType`. You can use the `TmfConfigurationSourceType.Builder` class to build such type. It has name, description, unique ID, an optional JSON schema file or a list of simple `TmfConfigurationParameter` instances. Use schema as much as you can. The schema will describe the JSON parameters, that `ITmfConfiguration.getParameters()` will return when passed to the configurator.
0 commit comments