-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[simulator][machine] Simulator config, command and improve logic #13
Commits on Nov 17, 2016
-
Configuration menu - View commit details
-
Copy full SHA for dbcbc71 - Browse repository at this point
Copy the full SHA dbcbc71View commit details
Commits on Nov 19, 2016
-
- use cobra to bind command line flag - use logrus for logging
Configuration menu - View commit details
-
Copy full SHA for 7ecdba3 - Browse repository at this point
Copy the full SHA 7ecdba3View commit details
Commits on Nov 20, 2016
-
Configuration menu - View commit details
-
Copy full SHA for e3e9261 - Browse repository at this point
Copy the full SHA e3e9261View commit details
Commits on Nov 21, 2016
-
[simulator][machine][config] Init reading config
- Add machine simulator config struct, which supports: num, start, end, step - add util function for read config file in test (TODO: don't know if it will have sideffect if is called multiple times)
Configuration menu - View commit details
-
Copy full SHA for 24e067d - Browse repository at this point
Copy the full SHA 24e067dView commit details -
[simulator][machine] Move to sub package
- the machine.go is already 150+ lines with current dumbest simulation logic, so should put it in sub package and split to several files - Add format script in Ayi, which will call gofmt
Configuration menu - View commit details
-
Copy full SHA for e3d5dcd - Browse repository at this point
Copy the full SHA e3d5dcdView commit details -
[simulator][machine] Split into several files
- machine is the pojo and factory for machine - simulator is the real machine simulator
Configuration menu - View commit details
-
Copy full SHA for 50f257b - Browse repository at this point
Copy the full SHA 50f257bView commit details -
[generator][time][value] Initial package
- intial time and value sub package under generator - add fixed interval - add constant - TestNewGenerator shows it is working
Configuration menu - View commit details
-
Copy full SHA for c97fac0 - Browse repository at this point
Copy the full SHA c97fac0View commit details -
[simulator][machine] Use machine as gen unit
- add functions ending with New, in order to have old code as example, will remove old and change name after migration - add value generator interface - when generate default machine, add seriesWithValueGenerater into machine - machine has different array for keep int and double series
Configuration menu - View commit details
-
Copy full SHA for 1449a1b - Browse repository at this point
Copy the full SHA 1449a1bView commit details -
[simulaor][machine] The new simulator is working
- see TestMachineSimulatorNew - TODO: why I saw more cpu_core=3 in log ouput - TODO: remove old generator code
Configuration menu - View commit details
-
Copy full SHA for 1e205af - Browse repository at this point
Copy the full SHA 1e205afView commit details
Commits on Nov 23, 2016
-
[simulator][machine] Remove old simulator code
- generate machine - add default machine - start - related property and methods in simulator interface
Configuration menu - View commit details
-
Copy full SHA for 4b21484 - Browse repository at this point
Copy the full SHA 4b21484View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e09db9 - Browse repository at this point
Copy the full SHA 0e09db9View commit details -
[simulator][machine] delete old point generator
- delete interface for point generator - delete constant int point generator - delete series with point generator
Configuration menu - View commit details
-
Copy full SHA for a908a4a - Browse repository at this point
Copy the full SHA a908a4aView commit details -
[cmd][simulator][machine] Init cmd content
- the simulator config struct is actually never used - TODO: not output in current default setting, might be problem with config file
Configuration menu - View commit details
-
Copy full SHA for 417ee97 - Browse repository at this point
Copy the full SHA 417ee97View commit details -
[bug][simulator][machine] panic for null ptr
It seems the serializer is not properly initialized ```` DEBU[0000] enable debug logging pkg=x.util DEBU[0000] config file xephon-b.yml is loaded pkg=x.cmd DEBU[0000] triggered simulator command pkg=x.cmd DEBU[0000] machine simulator start pkg=x.s.machine DEBU[0000] need to serialize pkg=x.s.machine panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x498eed] goroutine 21 [running]: panic(0x7bc3e0, 0xc420016120) /home/at15/app/go/src/runtime/panic.go:500 +0x1a1 github.com/xephonhq/xephon-b/pkg/simulator/machine.(*MachineSimulator).Start.func2(0xc42007cde0, 0xc4200aa630, 0xc42007ce40, 0xc42017c290) /home/at15/workspace/src/github.com/xephonhq/xephon-b/pkg/simulator/machine/simulator.go:84 +0x11d created by github.com/xephonhq/xephon-b/pkg/simulator/machine.(*MachineSimulator).Start /home/at15/workspace/src/github.com/xephonhq/xephon-b/pkg/simulator/machine/simulator.go:92 +0x20e ````
Configuration menu - View commit details
-
Copy full SHA for 17a01e9 - Browse repository at this point
Copy the full SHA 17a01e9View commit details -
[simualtor][machine] fix reading arguments
- treated output as encoding and cased the null pointer problem - change example num to 3 for less output when try the command - run `xb sim --debug --type json` to see json output - TODO: json serialize should have `\n` in order to be read by others
Configuration menu - View commit details
-
Copy full SHA for b58466f - Browse repository at this point
Copy the full SHA b58466fView commit details -
[simulator][machine] support file ouput
- ignore *.dat file as its the default output file suffix
Configuration menu - View commit details
-
Copy full SHA for fe62f59 - Browse repository at this point
Copy the full SHA fe62f59View commit details -
- TODO: use append may not be the most efficient way. But adding a wrapper for writer might be more messy since the writer should know little(nothing) about the serializer
Configuration menu - View commit details
-
Copy full SHA for 801bcd0 - Browse repository at this point
Copy the full SHA 801bcd0View commit details -
- though it seems file without calling f.Close
Configuration menu - View commit details
-
Copy full SHA for 78d1c30 - Browse repository at this point
Copy the full SHA 78d1c30View commit details