Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
adega
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
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
Odair M.
adega
Commits
2d250444
Commit
2d250444
authored
7 years ago
by
Jomaro Rodrigues
Browse files
Options
Downloads
Patches
Plain Diff
funcionando com tempo de processamento
parent
04b8752b
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
WIP: Development
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/script/main.py
+6
-3
6 additions, 3 deletions
src/script/main.py
src/uploads/models.py
+2
-0
2 additions, 0 deletions
src/uploads/models.py
with
8 additions
and
3 deletions
src/script/main.py
+
6
−
3
View file @
2d250444
...
...
@@ -2,12 +2,11 @@ import os
import
time
from
script.base.dataframe_base
import
load_dataframes
from
script.build_cache
import
build_cache
from
datetime
import
timedelta
from
script.analysis.degree_analysis
import
*
from
script.utils.situations
import
*
from
script.analysis.course_analysis
import
*
from
datetime
import
timedelta
def
analyze
(
submission
):
start_time
=
time
.
clock
()
start_time_exec
=
time
.
time
()
...
...
@@ -16,11 +15,15 @@ def analyze(submission):
build_cache
(
dataframe
)
submission
.
process_time
=
round
(
time
.
clock
()
-
start_time
)
submission
.
save
()
cpu_time
=
timedelta
(
seconds
=
round
(
time
.
clock
()
-
start_time
))
run_time
=
timedelta
(
seconds
=
round
(
time
.
time
()
-
start_time_exec
))
print
(
"
--- Tempo de CPU: {} ---
"
.
format
(
cpu_time
))
print
(
"
--- Tempo total: {} ---
"
.
format
(
run_time
))
def
main
():
start_time
=
time
.
clock
()
start_time_exec
=
time
.
time
()
...
...
This diff is collapsed.
Click to expand it.
src/uploads/models.py
+
2
−
0
View file @
2d250444
...
...
@@ -24,6 +24,8 @@ class Submission(models.Model):
processed
=
models
.
BooleanField
(
default
=
False
)
process_time
=
models
.
IntegerField
(
null
=
True
)
def
path
(
self
):
return
path
.
join
(
settings
.
MEDIA_ROOT
,
self
.
course
,
str
(
self
.
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