Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
19fc9838
Commit
19fc9838
authored
9 years ago
by
Manos Koukoutos
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused files
parent
c8eb81d6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/scala/leon/Stopwatch.scala
+0
-81
0 additions, 81 deletions
src/main/scala/leon/Stopwatch.scala
src/main/scala/leon/utils/DebugFiles.scala
+0
-3
0 additions, 3 deletions
src/main/scala/leon/utils/DebugFiles.scala
with
0 additions
and
84 deletions
src/main/scala/leon/Stopwatch.scala
deleted
100644 → 0
+
0
−
81
View file @
c8eb81d6
/* Copyright 2009-2015 EPFL, Lausanne */
package
leon
class
StopwatchCollection
(
name
:
String
)
{
var
acc
:
Long
=
0L
var
stopwatches
=
List
[
Stopwatch
]()
def
+=
(
sw
:
Stopwatch
)
=
synchronized
{
acc
+=
sw
.
getMillis
}
def
getMillis
=
{
val
running
=
(
0L
/:
stopwatches
)
{
(
res
,
sw
)
=>
res
+
sw
.
getMillis
}
acc
+
running
}
def
newStopwatch
=
{
val
result
=
new
Stopwatch
()
stopwatches
:+=
result
result
}
override
def
toString
=
f
"$name%20s: ${acc}%5dms"
}
/** Implements a stopwatch for profiling purposes */
class
Stopwatch
(
name
:
String
=
"Stopwatch"
)
{
var
beginning
:
Long
=
0L
var
end
:
Long
=
0L
var
acc
:
Long
=
0L
def
start
:
this.
type
=
{
beginning
=
System
.
currentTimeMillis
end
=
0L
this
}
def
stop
()
{
end
=
System
.
currentTimeMillis
acc
+=
(
end
-
beginning
)
beginning
=
0L
}
def
getMillis
:
Long
=
{
if
(
isRunning
)
{
acc
+
(
System
.
currentTimeMillis
-
beginning
)
}
else
{
acc
}
}
def
profile
[
T
](
block
:
=>
T
)
:
T
=
{
if
(
isRunning
)
stop
()
start
val
result
=
block
// call-by-name
stop
()
result
}
def
isRunning
=
beginning
!=
0L
override
def
toString
=
f
"$name%20s: $getMillis%5d${if (isRunning) "
...
" else ""}ms"
}
object
StopwatchCollections
{
private
var
all
=
Map
[
String
,
StopwatchCollection
]()
def
get
(
name
:
String
)
:
StopwatchCollection
=
all
.
getOrElse
(
name
,
{
val
sw
=
new
StopwatchCollection
(
name
)
all
+=
name
->
sw
sw
})
def
getAll
=
all
}
This diff is collapsed.
Click to expand it.
src/main/scala/leon/utils/DebugFiles.scala
deleted
100644 → 0
+
0
−
3
View file @
c8eb81d6
/* Copyright 2009-2015 EPFL, Lausanne */
package
leon.utils
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