Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LiME
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTS
LiME
Commits
c5a6b0f4
Commit
c5a6b0f4
authored
6 months ago
by
Bite Ye
Browse files
Options
Downloads
Patches
Plain Diff
Use BufReader when reading info files
parent
f5a0b84a
Branches
Branches containing commit
Tags
0.1.0
Tags containing commit
No related merge requests found
Pipeline
#123859
passed
6 months ago
Stage: build
Changes
1
Pipelines
3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/trace/reader.rs
+2
-2
2 additions, 2 deletions
src/trace/reader.rs
with
2 additions
and
2 deletions
src/trace/reader.rs
+
2
−
2
View file @
c5a6b0f4
...
...
@@ -155,7 +155,7 @@ impl TraceReader {
pub
fn
read_thread_infos
<
P
:
AsRef
<
Path
>>
(
path
:
P
)
->
Result
<
TaskInfos
>
{
let
file
=
File
::
open
(
path
)
?
;
let
tinfo
:
TaskInfos
=
serde_json
::
from_reader
(
file
)
?
;
let
tinfo
:
TaskInfos
=
serde_json
::
from_reader
(
BufReader
::
new
(
file
)
)
?
;
Ok
(
tinfo
)
}
...
...
@@ -166,7 +166,7 @@ impl TraceReader {
.map_err
(|
e
|
anyhow
::
anyhow!
(
"Failed to get task IDs: {}"
,
e
))
?
;
for
task_id
in
task_ids
{
if
let
Ok
(
file
)
=
self
.output_dir
.open_infos_file
(
&
task_id
)
{
if
let
Ok
(
infos
)
=
serde_json
::
from_reader
(
file
)
{
if
let
Ok
(
infos
)
=
serde_json
::
from_reader
(
BufReader
::
new
(
file
)
)
{
self
.task_infos
.insert
(
task_id
,
infos
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment