Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: Bug 579456: trace-server: use time range in TSP queries
In queries that require sampling of timestamps, replace the large requested_times array with a requested_timerange object. The timestamp array is then computed in the trace server. For the tree endpoint, replace requested_times array of [start, end] with a requested_timerange object with no nbTimes. For backward compatibility, the computed array is then put in the query parameters as the requested_times, overwriting it if present. Change-Id: I4549118df6d0b298bdc8f72dbbee8a7aa3a5f8d7 Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/191752 Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com> Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
- Loading branch information
1 parent
40e26bc
commit 9a1071a
Showing
8 changed files
with
123 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...clipse/tracecompass/incubator/internal/trace/server/jersey/rest/core/model/TimeRange.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2022 Ericsson | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License 2.0 which | ||
* accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
|
||
package org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.model; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
/** | ||
* Contributes to the model used for TSP swagger-core annotations. | ||
*/ | ||
@Schema(description = "A time range with optional number of timestamps to be sampled") | ||
public interface TimeRange { | ||
|
||
/** | ||
* @return The start time. | ||
*/ | ||
@Schema(description = "The start of the time range", required = true) | ||
long getStart(); | ||
|
||
/** | ||
* @return The end time. | ||
*/ | ||
@Schema(description = "The end of the time range", required = true) | ||
long getEnd(); | ||
|
||
/** | ||
* @return The number of times to be sampled. | ||
*/ | ||
@Schema(description = "The number of timestamps to be sampled (1-65536) in the given range", required = false) | ||
int getNbTimes(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.