Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
IndexKmerToRead
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vandamme Léa
IndexKmerToRead
Commits
7720a141
Commit
7720a141
authored
3 years ago
by
Vandamme Léa
Browse files
Options
Downloads
Patches
Plain Diff
modify resource usage in main
parent
e34d7833
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.vscode/settings.json
+5
-0
5 additions, 0 deletions
.vscode/settings.json
input_files/sequence.fa
+0
-0
0 additions, 0 deletions
input_files/sequence.fa
sources/main.cpp
+12
-0
12 additions, 0 deletions
sources/main.cpp
with
17 additions
and
0 deletions
.vscode/settings.json
0 → 100644
+
5
−
0
View file @
7720a141
{
"files.associations"
:
{
"iostream"
:
"cpp"
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
input_files/
read
.fa
→
input_files/
sequence
.fa
+
0
−
0
View file @
7720a141
File moved
This diff is collapsed.
Click to expand it.
sources/main.cpp
+
12
−
0
View file @
7720a141
...
...
@@ -29,9 +29,15 @@ int main(int argc, char *argv[])
auto
indexing
=
duration_cast
<
seconds
>
(
end_indexing
-
start_indexing
);
cout
<<
"Indexing takes "
<<
indexing
.
count
()
<<
" seconds."
<<
endl
;
//index.write_index("output_files/test.txt");
uint64_t
memory_used_index
=
getMemorySelfMaxUsed
();
cout
<<
"Resource usage (indexing) : "
<<
memory_used_index
<<
"Ko"
<<
endl
;
int
opt
;
uint64_t
memory_used_k
=
0
;
uint64_t
memory_used_s
=
0
;
uint64_t
memory_used_f
=
0
;
while
((
opt
=
getopt
(
argc
,
argv
,
"k:s:f:"
))
!=
EOF
)
{
switch
(
opt
)
...
...
@@ -50,6 +56,8 @@ int main(int argc, char *argv[])
auto
end_querying_kmer
=
high_resolution_clock
::
now
();
auto
querying_kmer
=
duration_cast
<
seconds
>
(
end_querying_kmer
-
start_querying_kmer
);
cout
<<
"Querying the k-mer takes "
<<
querying_kmer
.
count
()
<<
" seconds."
<<
endl
;
memory_used_k
=
getMemorySelfMaxUsed
();
cout
<<
"Resource usage (Querying a k-mer) : "
<<
memory_used_k
-
memory_used_index
<<
"Ko"
<<
endl
;
break
;
}
...
...
@@ -62,6 +70,8 @@ int main(int argc, char *argv[])
auto
end_querying_seq
=
high_resolution_clock
::
now
();
auto
querying_seq
=
duration_cast
<
seconds
>
(
end_querying_seq
-
start_querying_seq
);
cout
<<
"Querying the sequence takes "
<<
querying_seq
.
count
()
<<
" seconds."
<<
endl
;
memory_used_s
=
getMemorySelfMaxUsed
();
cout
<<
"Resource usage (Querying a sequence) : "
<<
memory_used_s
-
memory_used_k
<<
"Ko"
<<
endl
;
break
;
}
...
...
@@ -74,6 +84,8 @@ int main(int argc, char *argv[])
auto
end_querying_fasta
=
high_resolution_clock
::
now
();
auto
querying_fasta
=
duration_cast
<
seconds
>
(
end_querying_fasta
-
start_querying_fasta
);
cout
<<
"Querying the Fasta file takes "
<<
querying_fasta
.
count
()
<<
" seconds."
<<
endl
;
memory_used_f
=
getMemorySelfMaxUsed
();
cout
<<
"Resource usage (Querying a set of sequences) : "
<<
memory_used_f
-
memory_used_s
<<
"Ko"
<<
endl
;
break
;
}
...
...
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