Skip to content
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

Windows compatibility #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Windows compatibility #12

wants to merge 2 commits into from

Conversation

aminjam
Copy link

@aminjam aminjam commented Jan 26, 2017

This PR will enable the following features for turbulence on windows:

  • fill-disk
  • stress (CPU, RAM & IO)

The following blobs are needed for this PR to work:

sunjayBhatia and others added 2 commits January 26, 2017 14:20
- User `cert.ca` instead of `ca_cert` (updates for release v0.5)

- stress/stress-windows-1.0.4.zip blob was compiled using cygwin
- golang-windows/go1.7.4.windows-amd64.zip can be downloaded from
https://storage.googleapis.com/golang/go1.7.4.windows-amd64.zip
@cppforlife
Copy link
Owner

cppforlife commented Jan 26, 2017 via email

@cppforlife
Copy link
Owner

@aminjam im planning to do a little clean up before merging. i want to move compiled time windows separation to be a runtime check just like in shutdown_task.go for example. is there a particular reason that some agent tasks were picked to be split off at compile time?

@aminjam
Copy link
Author

aminjam commented Feb 17, 2017

@cppforlife runtime.GOOS could probably work. Some of the code paths were drastically different so it made sense to have a separate implementation. @sunjayBhatia @charlievieth Thoughts?

@sunjayBhatia
Copy link

@cppforlife @aminjam both options sound ok to me

@charlievieth
Copy link

charlievieth commented Feb 21, 2017

I'm ok with either, whatever leads to cleaner code.

If I remember correctly, we tried to get turbulence working on Windows in a hurry so some type definitions are duplicated in both *Nix and Windows code, which isn't great. There are also Windows specific functions, which places a burden on future devs to call the correct function based on the current OS.

Personally, I prefer to separate OS functionality by file as this leads to compile time errors when interfaces aren't satisfied or functionality is missing.

Both approaches are decided at compile time, (if runtime.GOOS == "OSNAME' {...} is a constant expression). The only difference is that the former (+build tags and os-specific filenames) results in a compile time error (i.e. function foo is missing on Windows), whereas lack of support in the latter won't be realized until runtime.

@benmoss
Copy link

benmoss commented Mar 5, 2019

damn we missed the two year anniversary of this pull request

@charlievieth
Copy link

@benmoss so many fond memories of working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants