Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pytools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pytools
Commits
7cbf6bf0
Commit
7cbf6bf0
authored
15 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of hpcgeek:/users/astock/code/pytools
parents
f87e50cb
d409ca8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/runalyzer-gather
+10
-5
10 additions, 5 deletions
bin/runalyzer-gather
with
10 additions
and
5 deletions
bin/runalyzer-gather
+
10
−
5
View file @
7cbf6bf0
...
@@ -261,7 +261,9 @@ def gather_multi_file(outfile, infiles, fmap, qmap, fg, features,
...
@@ -261,7 +261,9 @@ def gather_multi_file(outfile, infiles, fmap, qmap, fg, features,
db_conn
=
sqlite3
.
connect
(
outfile
)
db_conn
=
sqlite3
.
connect
(
outfile
)
run_columns
=
[
run_columns
=
[
"
id integer primary key
"
,
"
id integer primary key
"
,
"
dirname text
"
]
+
[
"
%s %s
"
%
(
fmap
.
get
(
fname
,
fname
),
ftype
)
"
dirname text
"
,
"
filename text
"
,
]
+
[
"
%s %s
"
%
(
fmap
.
get
(
fname
,
fname
),
ftype
)
for
fname
,
ftype
in
features
.
iteritems
()]
for
fname
,
ftype
in
features
.
iteritems
()]
db_conn
.
execute
(
"
create table runs (%s)
"
%
"
,
"
.
join
(
run_columns
))
db_conn
.
execute
(
"
create table runs (%s)
"
%
"
,
"
.
join
(
run_columns
))
db_conn
.
execute
(
"
create index runs_id on runs (id)
"
)
db_conn
.
execute
(
"
create index runs_id on runs (id)
"
)
...
@@ -276,7 +278,7 @@ def gather_multi_file(outfile, infiles, fmap, qmap, fg, features,
...
@@ -276,7 +278,7 @@ def gather_multi_file(outfile, infiles, fmap, qmap, fg, features,
created_tables
=
set
()
created_tables
=
set
()
from
os.path
import
dirname
from
os.path
import
dirname
,
basename
uid_to_run_id
=
{}
uid_to_run_id
=
{}
written_run_ids
=
set
()
written_run_ids
=
set
()
...
@@ -292,9 +294,12 @@ def gather_multi_file(outfile, infiles, fmap, qmap, fg, features,
...
@@ -292,9 +294,12 @@ def gather_multi_file(outfile, infiles, fmap, qmap, fg, features,
if
run_id
not
in
written_run_ids
:
if
run_id
not
in
written_run_ids
:
dbfeatures
=
fg
.
get_db_features
(
dbname
,
logmgr
)
dbfeatures
=
fg
.
get_db_features
(
dbname
,
logmgr
)
qry
=
"
insert into runs (%s) values (%s)
"
%
(
qry
=
"
insert into runs (%s) values (%s)
"
%
(
"
,
"
.
join
([
"
id
"
,
"
dirname
"
]
+
[
fmap
.
get
(
f
[
0
],
f
[
0
])
for
f
in
dbfeatures
]),
"
,
"
.
join
([
"
id
"
,
"
dirname
"
,
"
filename
"
]
"
,
"
.
join
(
"
?
"
*
(
len
(
dbfeatures
)
+
2
)))
+
[
fmap
.
get
(
f
[
0
],
f
[
0
])
for
f
in
dbfeatures
]),
rows
=
db_conn
.
execute
(
qry
,
[
run_id
,
dirname
(
dbname
)]
+
[
f
[
2
]
for
f
in
dbfeatures
])
"
,
"
.
join
(
"
?
"
*
(
len
(
dbfeatures
)
+
3
)))
rows
=
db_conn
.
execute
(
qry
,
[
run_id
,
dirname
(
dbname
),
basename
(
dbname
)]
+
[
f
[
2
]
for
f
in
dbfeatures
])
written_run_ids
.
add
(
run_id
)
written_run_ids
.
add
(
run_id
)
...
...
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