diff options
author | Loïc Prieur-Drevon | 2017-11-08 15:40:14 +0000 |
---|---|---|
committer | Loic Prieur-Drevon | 2017-11-15 16:48:33 +0000 |
commit | 9d1575402de95bc6651920f92d4c25d0068a6857 (patch) | |
tree | 38c3ad18f3a1e50ab93901a9bc58791d3fcc0ab8 | |
parent | 49137d9950b06681daee733a809e0cf8ecb7aa08 (diff) | |
download | org.eclipse.tracecompass-9d1575402de95bc6651920f92d4c25d0068a6857.tar.gz org.eclipse.tracecompass-9d1575402de95bc6651920f92d4c25d0068a6857.tar.xz org.eclipse.tracecompass-9d1575402de95bc6651920f92d4c25d0068a6857.zip |
linux.ui: allow the memory usage views to toggle filtering active threads.
This allows the data provider to have the expected default behavior:
return all threads, and only filter them when a FilterTimeQueryFilter
asks for filtering.
Change-Id: I30f72e8304d2dfb00f3c8165dff2b48bbf246bc4
Signed-off-by: Loïc Prieur-Drevon <loic.prieurdrevon@gmail.com>
Reviewed-on: https://git.eclipse.org/r/111243
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
9 files changed, 179 insertions, 18 deletions
diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelmemoryusage/KernelMemoryUsageDataProvider.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelmemoryusage/KernelMemoryUsageDataProvider.java index a52449aab1..a954169337 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelmemoryusage/KernelMemoryUsageDataProvider.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/kernelmemoryusage/KernelMemoryUsageDataProvider.java @@ -31,6 +31,7 @@ import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernelmemoryusag import org.eclipse.tracecompass.internal.provisional.tmf.core.model.AbstractStateSystemAnalysisDataProvider; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.CommonStatusMessage; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.TmfCommonXAxisResponseFactory; +import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.FilterTimeQueryFilter; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.SelectionTimeQueryFilter; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TimeQueryFilter; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.xy.ITmfCommonXAxisModel; @@ -271,6 +272,11 @@ public class KernelMemoryUsageDataProvider extends AbstractStateSystemAnalysisDa return new TmfModelResponse<>(null, ITmfResponse.Status.FAILED, CommonStatusMessage.STATE_SYSTEM_FAILED); } boolean complete = ss.waitUntilBuilt(0); + // to filter the active threads or not + boolean filtered = false; + if (filter instanceof FilterTimeQueryFilter) { + filtered = ((FilterTimeQueryFilter) filter).isFiltered(); + } try { List<MemoryUsageTreeModel> nodes = new ArrayList<>(); @@ -280,7 +286,7 @@ public class KernelMemoryUsageDataProvider extends AbstractStateSystemAnalysisDa nodes.add(new MemoryUsageTreeModel(fTotalId, -1, TOTAL_TID, getTrace().getName())); for (Integer threadQuark : threadQuarkList) { ITmfStateInterval threadMemoryInterval = memoryStates.get(threadQuark); - if (threadMemoryInterval.getEndTime() < end) { + if (!filtered || threadMemoryInterval.getEndTime() < end) { String tidString = ss.getAttributeName(threadQuark); String procname = getProcessName(tidString); diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageTreeViewer.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageTreeViewer.java index 6069c54a7d..49469b6f5d 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageTreeViewer.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageTreeViewer.java @@ -10,9 +10,12 @@ package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.memory; import java.util.Comparator; +import org.eclipse.jdt.annotation.Nullable; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Composite; import org.eclipse.tracecompass.analysis.os.linux.core.memory.MemoryUsageTreeModel; +import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.FilterTimeQueryFilter; +import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TimeQueryFilter; import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractSelectTreeViewer; import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider; import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfGenericTreeEntry; @@ -67,6 +70,9 @@ public class MemoryUsageTreeViewer extends AbstractSelectTreeViewer { } } + // view is filtered by default + private boolean fFiltered = true; + /** * Constructor * @@ -81,6 +87,11 @@ public class MemoryUsageTreeViewer extends AbstractSelectTreeViewer { } @Override + protected @Nullable TimeQueryFilter getFilter(long start, long end, boolean isSelection) { + return new FilterTimeQueryFilter(start, end, 2, fFiltered); + } + + @Override protected ITmfTreeColumnDataProvider getColumnDataProvider() { return () -> { Comparator<TmfGenericTreeEntry<MemoryUsageTreeModel>> compareTid = Comparator.comparingInt(c -> c.getModel().getTid()); @@ -90,4 +101,15 @@ public class MemoryUsageTreeViewer extends AbstractSelectTreeViewer { new TmfTreeColumnData(Messages.MemoryUsageTree_Legend)); }; } + + /** + * Set the view to filter active threads or not. + * + * @param isFiltered + * if we filter the active threads or not. + */ + public void setFiltered(boolean isFiltered) { + fFiltered = isFiltered; + updateContent(getWindowStartTime(), getWindowEndTime(), false); + } }
\ No newline at end of file diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageView.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageView.java index bcfca6bdc2..7b240bfbc9 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageView.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/MemoryUsageView.java @@ -9,6 +9,8 @@ package org.eclipse.tracecompass.internal.analysis.os.linux.ui.views.memory; import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; import org.eclipse.swt.widgets.Composite; import org.eclipse.tracecompass.analysis.os.linux.core.memory.MemoryUsageTreeModel; import org.eclipse.tracecompass.common.core.format.DataSizeWithUnitFormat; @@ -24,6 +26,7 @@ import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfCommonXAxi import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfFilteredXYChartViewer; import org.eclipse.tracecompass.tmf.ui.viewers.xycharts.linecharts.TmfXYChartSettings; import org.eclipse.tracecompass.tmf.ui.views.TmfChartView; +import org.eclipse.ui.plugin.AbstractUIPlugin; /** * Memory usage view @@ -92,5 +95,31 @@ public class MemoryUsageView extends TmfChartView { memoryTree.setTreeListener((TmfFilteredXYChartViewer) chart); memoryTree.setLegendImageProvider(legendImageProvider); } + + // Add a tool bar button to filter active threads. + getViewSite().getActionBars().getToolBarManager().add(getFilterAction()); + } + + private Action getFilterAction() { + Action action = new Action(Messages.MemoryView_FilterAction_Text, IAction.AS_CHECK_BOX) { + // memory view is filtered by default. + private boolean isFiltered = true; + + @Override + public void run() { + isFiltered ^= true; + setToolTipText(isFiltered ? Messages.MemoryView_FilterAction_FilteredTooltipText : Messages.MemoryView_FilterAction_UnfilteredTooltipText); + TmfViewer tree = getLeftChildViewer(); + if (tree instanceof MemoryUsageTreeViewer) { + MemoryUsageTreeViewer memoryUsageTreeViewer = (MemoryUsageTreeViewer) tree; + memoryUsageTreeViewer.setFiltered(isFiltered); + } + } + }; + action.setToolTipText(Messages.MemoryView_FilterAction_FilteredTooltipText); + action.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.tracecompass.tmf.ui", "icons/elcl16/filter_items.gif")); //$NON-NLS-1$ //$NON-NLS-2$ + // filtered by default, to not change the default behavior + action.setChecked(true); + return action; } } diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/Messages.java b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/Messages.java index 27bcb125d9..9d0852555a 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/Messages.java +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/Messages.java @@ -25,6 +25,10 @@ public class Messages { public static String MemoryUsageTree_Legend; public static String MemoryUsageTree_Total; + public static String MemoryView_FilterAction_Text; + public static String MemoryView_FilterAction_FilteredTooltipText; + public static String MemoryView_FilterAction_UnfilteredTooltipText; + static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, Messages.class); diff --git a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/messages.properties b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/messages.properties index f6f002c160..923164ef64 100644 --- a/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/messages.properties +++ b/analysis/org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/internal/analysis/os/linux/ui/views/memory/messages.properties @@ -10,4 +10,8 @@ MemoryUsageTree_ColumnProcess=Process name MemoryUsageTree_ColumnTID=TID MemoryUsageTree_Legend=Legend -MemoryUsageTree_Total=Total
\ No newline at end of file +MemoryUsageTree_Total=Total + +MemoryView_FilterAction_Text=Filter Active Threads +MemoryView_FilterAction_FilteredTooltipText=Showing active threads +MemoryView_FilterAction_UnfilteredTooltipText=Showing all threads
\ No newline at end of file diff --git a/doc/org.eclipse.tracecompass.doc.user/doc/User-Guide.mediawiki b/doc/org.eclipse.tracecompass.doc.user/doc/User-Guide.mediawiki index dc1ae4b278..cc24b0b33d 100644 --- a/doc/org.eclipse.tracecompass.doc.user/doc/User-Guide.mediawiki +++ b/doc/org.eclipse.tracecompass.doc.user/doc/User-Guide.mediawiki @@ -2445,6 +2445,8 @@ Where: The view is divided into the following important sections: '''Process Information''' and the '''Relative Kernel Memory Usage'''. The time axis is aligned with other views that support automatic time axis alignment (see [[#Automatic Time Axis Alignment | Automatic Time Axis Alignment]]). +The filter button: [[Image:images/filter_items.gif]] can be used to show only the active threads in the tree viewer. By default only the threads which have had memory usage variations in the visible time range will be shown, clicking the button will reveal all the threads. + === Process Information === @@ -2818,6 +2820,8 @@ The view shows the memory consumption for the currently selected trace. The time chart plots heap memory usage graphically over time. There is one line per process, unassigned memory usage is mapped to "Other". +The filter button: [[Image:images/filter_items.gif]] can be used to show only the active threads in the tree viewer. By default only the threads which have had memory usage variations in the visible time range will be shown, clicking the button will reveal all the threads. + In this implementation, the user needs to trace while hooking the ''liblttng-ust-libc-wrapper'' by running ''LD_PRELOAD=liblttng-ust-libc-wrapper.so'' '''<exename>'''. This will add tracepoints to memory allocation and freeing to the heap, NOT shared memory or stack usage. If the contexts '''vtid''' and '''procname''' are enabled, then the view will associate the heap usage to processes. As detailed earlier, to enable the contexts, see the [[#Adding Contexts to Channels and Events of a Domain]] section. Or if using the command-line: * <pre>lttng add-context -u -t vtid -t procname</pre> diff --git a/lttng/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/KernelMemoryUsageViewTest.java b/lttng/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/KernelMemoryUsageViewTest.java index 4f9eee7b81..67a816171b 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/KernelMemoryUsageViewTest.java +++ b/lttng/org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/kernel/ui/swtbot/tests/KernelMemoryUsageViewTest.java @@ -122,6 +122,42 @@ public class KernelMemoryUsageViewTest extends XYDataProviderBaseTest { SWTBotUtils.waitUntil(json -> isChartDataValid(chart, json, CONSUMERD_PID), "resources/kernelmemory/kernel-memory-res100Selected.json", "Chart data is not valid"); } + /** + * Test that the filter button works + * + * @throws NoSuchMethodException + * Reflection exception should not happen + * @throws SecurityException + * Reflection exception should not happen + * @throws IllegalAccessException + * Reflection exception should not happen + * @throws IllegalArgumentException + * Reflection exception should not happen + * @throws InvocationTargetException + * Reflection exception should not happen + */ + @Test + public void testFilter() throws NoSuchMethodException, SecurityException, + IllegalAccessException, IllegalArgumentException, InvocationTargetException { + IViewPart viewSite = getSWTBotView().getViewReference().getView(true); + assertTrue(viewSite instanceof KernelMemoryUsageView); + final TmfCommonXAxisChartViewer chartViewer = (TmfCommonXAxisChartViewer) getChartViewer(viewSite); + assertNotNull(chartViewer); + fBot.waitUntil(ConditionHelpers.xyViewerIsReadyCondition(chartViewer)); + + SWTBotTree treeBot = getSWTBotView().bot().tree(); + SWTBotTreeItem totalNode = treeBot.getTreeItem(fTraceName); + SWTBotUtils.waitUntil(root -> root.getItems().length == 5, totalNode, "Failed to load the filtered threads"); + + getSWTBotView().toolbarButton("Showing active threads").click(); + totalNode = treeBot.getTreeItem(fTraceName); + SWTBotUtils.waitUntil(root -> root.getItems().length == 16, totalNode, "Failed to load all the threads"); + + getSWTBotView().toolbarButton("Showing all threads").click(); + totalNode = treeBot.getTreeItem(fTraceName); + SWTBotUtils.waitUntil(root -> root.getItems().length == 5, totalNode, "Failed to filter the threads"); + } + @Override protected @NonNull String getMainSeriesName() { return TOTAL_PID; diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/memory/UstMemoryUsageDataProvider.java b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/memory/UstMemoryUsageDataProvider.java index 0699bcc7c1..fbc8e442db 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/memory/UstMemoryUsageDataProvider.java +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/memory/UstMemoryUsageDataProvider.java @@ -26,6 +26,7 @@ import org.eclipse.tracecompass.internal.lttng2.ust.core.analysis.memory.UstMemo import org.eclipse.tracecompass.internal.provisional.tmf.core.model.AbstractStateSystemAnalysisDataProvider; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.CommonStatusMessage; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.TmfCommonXAxisResponseFactory; +import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.FilterTimeQueryFilter; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.SelectionTimeQueryFilter; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TimeQueryFilter; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.xy.ITmfCommonXAxisModel; @@ -70,7 +71,6 @@ public class UstMemoryUsageDataProvider extends AbstractStateSystemAnalysisDataP * reused per every quark, and finds the quarks to query for the XY models. */ private final BiMap<Long, Integer> fIdToQuark = HashBiMap.create(); - private @Nullable TmfModelResponse<List<MemoryUsageTreeModel>> fCached; private final long fTraceId = ENTRY_IDS.getAndIncrement(); private final UstMemoryAnalysisModule fModule; @@ -192,9 +192,6 @@ public class UstMemoryUsageDataProvider extends AbstractStateSystemAnalysisDataP */ @Override public TmfModelResponse<List<MemoryUsageTreeModel>> fetchTree(TimeQueryFilter filter, @Nullable IProgressMonitor monitor) { - if (fCached != null) { - return fCached; - } // Waiting for initialization should ensure that the state system is not null. fModule.waitForInitialization(); @@ -205,10 +202,17 @@ public class UstMemoryUsageDataProvider extends AbstractStateSystemAnalysisDataP // Get the quarks before the full states to ensure that the attributes will be present in the full state boolean isComplete = ss.waitUntilBuilt(0); + // to filter the active threads or not + boolean filtered = false; + if (filter instanceof FilterTimeQueryFilter) { + filtered = ((FilterTimeQueryFilter) filter).isFiltered(); + } List<Integer> tidQuarks = ss.getSubAttributes(-1, false); - List<ITmfStateInterval> fullState; + List<ITmfStateInterval> nameFullState; + List<ITmfStateInterval> activeFullState; try { - fullState = ss.queryFullState(ss.getCurrentEndTime()); + nameFullState = ss.queryFullState(ss.getCurrentEndTime()); + activeFullState = ss.queryFullState(Long.max(filter.getStart(), ss.getStartTime())); } catch (StateSystemDisposedException e) { return new TmfModelResponse<>(null, ITmfResponse.Status.FAILED, CommonStatusMessage.STATE_SYSTEM_FAILED); } @@ -220,23 +224,25 @@ public class UstMemoryUsageDataProvider extends AbstractStateSystemAnalysisDataP int procNameQuark = ss.optQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE); if (memoryAttribute != ITmfStateSystem.INVALID_ATTRIBUTE && procNameQuark != ITmfStateSystem.INVALID_ATTRIBUTE) { - String name = String.valueOf(fullState.get(procNameQuark).getValue()); - int tid = Integer.parseInt(ss.getAttributeName(quark)); - - // Check if an ID has already been created for this quark. - Long id = fIdToQuark.inverse().get(quark); - if (id == null) { - id = ENTRY_IDS.getAndIncrement(); - fIdToQuark.put(id, quark); + ITmfStateInterval threadMemoryInterval = activeFullState.get(memoryAttribute); + if (!filtered || threadMemoryInterval.getEndTime() < filter.getEnd()) { + String name = String.valueOf(nameFullState.get(procNameQuark).getValue()); + int tid = Integer.parseInt(ss.getAttributeName(quark)); + + // Check if an ID has already been created for this quark. + Long id = fIdToQuark.inverse().get(quark); + if (id == null) { + id = ENTRY_IDS.getAndIncrement(); + fIdToQuark.put(id, quark); + } + builder.add(new MemoryUsageTreeModel(id, fTraceId, tid, name)); } - builder.add(new MemoryUsageTreeModel(id, fTraceId, tid, name)); } } ImmutableList<MemoryUsageTreeModel> list = builder.build(); if (isComplete) { TmfModelResponse<List<MemoryUsageTreeModel>> tmfModelResponse = new TmfModelResponse<>(list, ITmfResponse.Status.COMPLETED, CommonStatusMessage.COMPLETED); - fCached = tmfModelResponse; return tmfModelResponse; } return new TmfModelResponse<>(list, ITmfResponse.Status.RUNNING, CommonStatusMessage.RUNNING); diff --git a/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/internal/provisional/tmf/core/model/filters/FilterTimeQueryFilter.java b/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/internal/provisional/tmf/core/model/filters/FilterTimeQueryFilter.java new file mode 100644 index 0000000000..14dd138538 --- /dev/null +++ b/tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/internal/provisional/tmf/core/model/filters/FilterTimeQueryFilter.java @@ -0,0 +1,50 @@ +/********************************************************************** + * Copyright (c) 2017 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + **********************************************************************/ + +package org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters; + +/** + * A {@link TimeQueryFilter} with an additional field to tell the provider to + * filter its data or not. + * + * @author Loic Prieur-Drevon + */ +public class FilterTimeQueryFilter extends TimeQueryFilter { + + private final boolean fFiltered; + + /** + * Constructor. Given a start value, end value and n entries, this constructor + * will set its property to an array of n entries uniformly distributed and + * ordered ascendingly. + * + * @param start + * The starting value + * @param end + * The ending value + * @param n + * The number of entries + * @param filtered + * if the provider should filter the returned data. + **/ + public FilterTimeQueryFilter(long start, long end, int n, boolean filtered) { + super(start, end, n); + fFiltered = filtered; + } + + /** + * Get the filtering status + * + * @return if the provider should filter the returned data. + */ + public boolean isFiltered() { + return fFiltered; + } + +} |