Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
468e92a4
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
468e92a4
编写于
5月 21, 2019
作者:
M
michael4338
提交者:
Xiangquan Xiao
5月 21, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tools: smart recorder bug fixes
上级
04022954
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
13 addition
and
12 deletion
+13
-12
modules/data/tools/smart_recorder/proto/smart_recorder_triggers.proto
.../tools/smart_recorder/proto/smart_recorder_triggers.proto
+3
-3
modules/data/tools/smart_recorder/realtime_record_processor.cc
...es/data/tools/smart_recorder/realtime_record_processor.cc
+8
-7
modules/data/tools/smart_recorder/record_processor.cc
modules/data/tools/smart_recorder/record_processor.cc
+2
-2
未找到文件。
modules/data/tools/smart_recorder/proto/smart_recorder_triggers.proto
浏览文件 @
468e92a4
...
...
@@ -3,9 +3,9 @@ syntax = "proto2";
package
apollo
.
data
;
message
RecordSegmentSetting
{
// Segmentation of restored records in size or time
, default is by size 200MB
optional
int32
size_segment
=
1
[
default
=
2
00
];
optional
int32
time_segment
=
2
;
// Segmentation of restored records in size or time
optional
int32
size_segment
=
1
[
default
=
5
00
];
optional
int32
time_segment
=
2
[
default
=
180
]
;
}
message
Trigger
{
...
...
modules/data/tools/smart_recorder/realtime_record_processor.cc
浏览文件 @
468e92a4
...
...
@@ -42,14 +42,14 @@ namespace {
using
apollo
::
common
::
Header
;
using
apollo
::
common
::
util
::
StrCat
;
using
cyber
::
CreateNode
;
using
cyber
::
common
::
EnsureDirectory
;
using
cyber
::
common
::
GetFileName
;
using
cyber
::
common
::
PathExists
;
using
cyber
::
CreateNode
;
using
cyber
::
record
::
HeaderBuilder
;
using
cyber
::
record
::
Recorder
;
using
cyber
::
record
::
RecordFileReader
;
using
cyber
::
record
::
RecordMessage
;
using
cyber
::
record
::
RecordFileReader
;
using
cyber
::
record
::
RecordReader
;
using
cyber
::
record
::
RecordViewer
;
...
...
@@ -202,7 +202,7 @@ void RealtimeRecordProcessor::PublishStatus(const RecordingState state,
}
bool
RealtimeRecordProcessor
::
GetNextValidRecord
(
std
::
string
*
record_path
)
const
{
std
::
string
*
const
record_path
)
const
{
*
record_path
=
StrCat
(
source_record_dir_
,
"/"
,
default_output_filename_
,
"."
,
GetNextRecordFileName
(
*
record_path
));
while
(
!
is_terminating_
&&
!
IsRecordValid
(
*
record_path
))
{
...
...
@@ -223,12 +223,13 @@ void RealtimeRecordProcessor::RestoreMessage(const uint64_t message_time) {
const
uint64_t
target_end
=
std
::
max
(
interval
.
end_time
,
message_time
-
static_cast
<
uint64_t
>
(
max_backward_time_
*
1000000000UL
));
if
(
target_end
<=
const
bool
small_channels_only
=
restore_reader_time_
>=
interval
.
end_time
;
if
(
small_channels_only
&&
target_end
<=
restore_reader_time_
+
static_cast
<
uint64_t
>
(
min_restore_chunk_
*
1000000000UL
))
{
return
;
}
const
bool
small_channels_only
=
interval
.
end_time
==
0
;
do
{
if
(
!
IsRecordValid
(
restore_path_
))
{
AWARN
<<
"invalid restore path "
<<
restore_path_
<<
", exit"
;
...
...
modules/data/tools/smart_recorder/record_processor.cc
浏览文件 @
468e92a4
...
...
@@ -54,9 +54,9 @@ bool RecordProcessor::Init(const SmartRecordTrigger& trigger_conf) {
// Init writer
writer_
.
reset
(
new
RecordWriter
());
writer_
->
SetIntervalOfFileSegmentation
(
trigger_conf
.
segment_setting
().
size_segment
()
*
1024UL
);
trigger_conf
.
segment_setting
().
time_segment
()
);
writer_
->
SetSizeOfFileSegmentation
(
trigger_conf
.
segment_setting
().
time_segment
()
*
1000000000
UL
);
trigger_conf
.
segment_setting
().
size_segment
()
*
1024
UL
);
const
std
::
string
output_file
=
GetDefaultOutputFile
();
AINFO
<<
"output file path: "
<<
output_file
;
if
(
!
writer_
->
Open
(
output_file
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录