Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apachedex
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
apachedex
Commits
fa46d997
Commit
fa46d997
authored
Apr 09, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add state loading stats.
parent
46535e9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
apachedex/__init__.py
apachedex/__init__.py
+9
-3
No files found.
apachedex/__init__.py
View file @
fa46d997
...
@@ -942,7 +942,7 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
...
@@ -942,7 +942,7 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
out
.
write
(
'<h1>Parsing stats</h1><table class="stats">'
)
out
.
write
(
'<h1>Parsing stats</h1><table class="stats">'
)
buildno
,
builddate
=
platform
.
python_build
()
buildno
,
builddate
=
platform
.
python_build
()
end_parsing_time
=
stats
[
'end_parsing_time'
]
end_parsing_time
=
stats
[
'end_parsing_time'
]
parsing_time
=
end_parsing_time
-
stats
[
'start_time'
]
parsing_time
=
end_parsing_time
-
stats
[
'
parsing_
start_time'
]
all_lines
=
stats
[
'all_lines'
]
all_lines
=
stats
[
'all_lines'
]
for
caption
,
value
in
(
for
caption
,
value
in
(
(
'Execution date'
,
datetime
.
now
().
isoformat
()),
(
'Execution date'
,
datetime
.
now
().
isoformat
()),
...
@@ -952,6 +952,9 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
...
@@ -952,6 +952,9 @@ def asHTML(out, encoding, per_site, args, default_site, period_parameter_dict,
buildno
,
buildno
,
builddate
,
builddate
,
)),
)),
(
'State file count'
,
stats
[
'state_file_count'
]),
(
'State loading time'
,
timedelta
(
seconds
=
stats
[
'parsing_start_time'
]
-
stats
[
'loading_start_time'
])),
(
'File count'
,
stats
[
'file_count'
]),
(
'File count'
,
stats
[
'file_count'
]),
(
'Lines'
,
all_lines
),
(
'Lines'
,
all_lines
),
(
'... malformed'
,
stats
[
'malformed_lines'
]),
(
'... malformed'
,
stats
[
'malformed_lines'
]),
...
@@ -1149,6 +1152,7 @@ def main():
...
@@ -1149,6 +1152,7 @@ def main():
if
'-'
in
args
.
state_file
and
'-'
in
infile_list
:
if
'-'
in
args
.
state_file
and
'-'
in
infile_list
:
print
>>
sys
.
stderr
,
'stdin cannot be used both as log and state input.'
print
>>
sys
.
stderr
,
'stdin cannot be used both as log and state input.'
sys
.
exit
(
1
)
sys
.
exit
(
1
)
loading_start_time
=
time
.
time
()
for
state_file_name
in
args
.
state_file
:
for
state_file_name
in
args
.
state_file
:
print
>>
sys
.
stderr
,
'Loading'
,
state_file_name
,
'...'
,
print
>>
sys
.
stderr
,
'Loading'
,
state_file_name
,
'...'
,
if
state_file_name
==
'-'
:
if
state_file_name
==
'-'
:
...
@@ -1187,7 +1191,7 @@ def main():
...
@@ -1187,7 +1191,7 @@ def main():
all_lines
=
0
all_lines
=
0
skipped_user_agent
=
0
skipped_user_agent
=
0
show_progress
=
not
args
.
extra_quiet
show_progress
=
not
args
.
extra_quiet
start_time
=
time
.
time
()
parsing_
start_time
=
time
.
time
()
for
fileno
,
filename
in
enumerate
(
infile_list
,
1
):
for
fileno
,
filename
in
enumerate
(
infile_list
,
1
):
if
show_progress
:
if
show_progress
:
print
>>
sys
.
stderr
,
'Processing %s [%i/%i]'
%
(
print
>>
sys
.
stderr
,
'Processing %s [%i/%i]'
%
(
...
@@ -1295,7 +1299,9 @@ def main():
...
@@ -1295,7 +1299,9 @@ def main():
'graph_period'
:
graph_period
,
'graph_period'
:
graph_period
,
'graph_coefficient'
:
graph_coefficient
,
'graph_coefficient'
:
graph_coefficient
,
},
{
},
{
'start_time'
:
start_time
,
'state_file_count'
:
len
(
args
.
state_file
),
'loading_start_time'
:
loading_start_time
,
'parsing_start_time'
:
parsing_start_time
,
'end_parsing_time'
:
end_parsing_time
,
'end_parsing_time'
:
end_parsing_time
,
'file_count'
:
file_count
,
'file_count'
:
file_count
,
'all_lines'
:
all_lines
,
'all_lines'
:
all_lines
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment