Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
User expired
2018s-advanced-distributed-systems
Commits
d6a8dc35
Unverified
Commit
d6a8dc35
authored
Nov 12, 2018
by
Bennett Piater
Browse files
generate floats instead of ints
parent
73f9ad56
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
sensors/producer/index.js
sensors/producer/index.js
+4
-1
No files found.
sensors/producer/index.js
View file @
d6a8dc35
...
...
@@ -13,7 +13,10 @@ async function main({id}) {
});
let
date
=
Date
.
now
()
let
value
=
Math
.
floor
(
Math
.
random
()
*
41
)
const
min
=
0
const
max
=
40
let
value
=
Math
.
random
()
*
(
max
-
min
)
+
min
console
.
log
(
value
)
const
producer
=
kafka
.
producer
()
await
producer
.
connect
()
...
...
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