Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swen90006-a2-2019
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
Toby Murray
swen90006-a2-2019
Commits
429991e1
Commit
429991e1
authored
Oct 21, 2019
by
Robert Sharp
Browse files
Options
Downloads
Patches
Plain Diff
More brownian
parent
1c8d003f
Branches
Branches containing commit
No related tags found
1 merge request
!16
Brownian motion fuzzer
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
fuzzer/Fuzzer.java
+7
-3
7 additions, 3 deletions
fuzzer/Fuzzer.java
with
7 additions
and
3 deletions
fuzzer/Fuzzer.java
+
7
−
3
View file @
429991e1
...
@@ -28,6 +28,8 @@ public class Fuzzer {
...
@@ -28,6 +28,8 @@ public class Fuzzer {
//Brownian values
//Brownian values
private
static
boolean
USEBROWNIAN
=
true
;
private
static
boolean
USEBROWNIAN
=
true
;
private
static
final
double
MAX_FREQ
=
200
;
private
static
final
double
PUT_START
=
100
;
private
static
final
double
PUT_START
=
100
;
private
static
final
double
GET_START
=
10
;
private
static
final
double
GET_START
=
10
;
private
static
final
double
REM_START
=
10
;
private
static
final
double
REM_START
=
10
;
...
@@ -40,8 +42,8 @@ public class Fuzzer {
...
@@ -40,8 +42,8 @@ public class Fuzzer {
private
static
final
double
SAVE_VAR
=
5
;
private
static
final
double
SAVE_VAR
=
5
;
private
static
final
double
LIST_VAR
=
5
;
private
static
final
double
LIST_VAR
=
5
;
//
public static void Fuzzer() throws IOException {
public
static
void
Fuzzer
()
throws
IOException
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
//
public static void main(String[] args) throws IOException {
//Rob's code
//Rob's code
Double
[]
freqValues
=
null
;
Double
[]
freqValues
=
null
;
...
@@ -248,6 +250,8 @@ public class Fuzzer {
...
@@ -248,6 +250,8 @@ public class Fuzzer {
for
(
i
=
0
;
i
<
INSTS
.
length
-
1
;
i
++)
{
for
(
i
=
0
;
i
<
INSTS
.
length
-
1
;
i
++)
{
freqValues
[
i
]
=
freqValues
[
i
]
+
((
random
.
nextDouble
()
*
2
)
-
1
)
*
varValues
[
i
];
freqValues
[
i
]
=
freqValues
[
i
]
+
((
random
.
nextDouble
()
*
2
)
-
1
)
*
varValues
[
i
];
//Put in a ceiling to ensure doesn't do infinite PUTs
if
(
Math
.
abs
(
freqValues
[
i
])
>
MAX_FREQ
)
{
freqValues
[
i
]
=
MAX_FREQ
;}
//System.out.println("The index of: "+i + "has the frequency values of: "+freqValues[i]);
//System.out.println("The index of: "+i + "has the frequency values of: "+freqValues[i]);
}
}
...
...
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