public static List<ThreadSnapshot> parseFromFileWithTimeRange(File file, final List<SegmentProfileAnalyzeQuery> queries) throws IOException {
        try (final FileInputStream fileInputStream = new FileInputStream(file)) {
            ThreadSnapshot snapshot;
            final ArrayList<ThreadSnapshot> data = new ArrayList<>();
            while ((snapshot = ThreadSnapshot.parseDelimitedFrom(fileInputStream)) != null) {
                ThreadSnapshot finalSnapshot = snapshot;
                if (queries.stream().anyMatch(t -> finalSnapshot.getTime() >= t.getTimeRange().getStart() && finalSnapshot.getTime() <= t.getTimeRange().getEnd())) {
                    data.add(snapshot);
                }
            }
            return data;
        }
    }
load thread snapshots in appointing time range
oap-server/server-tools/profile-exporter/tool-profile-snapshot-bootstrap/src/main/java/org/apache/skywalking/oap/server/tool/profile/exporter/ProfileSnapshotDumper.java