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

dmts has debug mode? #25

Open
akiradeveloper opened this issue May 17, 2014 · 5 comments
Open

dmts has debug mode? #25

akiradeveloper opened this issue May 17, 2014 · 5 comments

Comments

@akiradeveloper
Copy link
Contributor

Does dmts have debug mode to debug the tests itself?

Usually, the data amount to use in tests are too big to wait. My idea with debug mode is to reduce the size to see the tests actually works (e.g. 128m -> 1m).

If dmts doesn't have one, there are two ways to implement debug mode

  • Using environmental variable (DEBUG=1 dmtest run ...)
  • add --debug option to dmtest command like --profile.

Either way, it is important to be able to access from anywhere in the tests.

@jthornber
Copy link
Owner

Why not create a profile that uses smaller volumes? You could use LVM to
create them.

On 17 May 2014 08:18, Akira Hayakawa [email protected] wrote:

Does dmts have debug mode to debug the tests itself?

Usually, the data amount to use in tests are too big to wait. My idea with
debug mode is to reduce the size to see the tests actually works (e.g. 128m
-> 1m).

If dmts doesn't have one, there are two ways to implement debug mode

  • Using environmental variable (DEBUG=1 dmtest run ...)
  • add --debug option to dmtest command like --profile.

Either way, it is important to be able to access from anywhere in the
tests.


Reply to this email directly or view it on GitHubhttps://github.com//issues/25
.

@akiradeveloper
Copy link
Contributor Author

Hi, this is not a matter of device size but about the parameter to the benchmark program.

For example, the code below reduces the amount of data to write by changing --size parameter to fio. This makes it run fast and helps us debug the test. My suggestion is to add such switch to dmtest. If you don't like the idea, it is OK. Passing the flag from the user can be done though environmental variable (or it is rather natural cf. make -DDEBUG ...).

  def test_fio_read_overhead
    @param[0] = DEBUGMODE ? 1 : 128

    def run_fio(dev, iosize)
      ProcessControl.run("fio --name=test --filename=#{dev.path} --rw=randread --ioengine=libaio --direct=1 --size=#{@param[0]}m --ba=#{iosize}k --bs=#{iosize}k --iodepth=32")
      ProcessControl.run("sync")
      drop_caches
    end

@jthornber
Copy link
Owner

ok, I understand. Perhaps the best is to add another variable to the
profile, and key off that. eg, test_scale = :small
What do you think?

On 17 May 2014 12:39, Akira Hayakawa [email protected] wrote:

Hi, this is not a matter of device size but about the parameter to the
benchmark program.

For example, the code below reduces the amount of data to write by
changing --size parameter to fio. This makes it run fast and helps us debug
the test. My suggestion is to add such switch to dmtest. If you don't like
the idea, it is OK. Passing the flag from the user can be done though
environmental variable (or it is rather natural cf. make -DDEBUG ...).

def test_fio_read_overhead
@param[0] = DEBUGMODE ? 1 : 128

def run_fio(dev, iosize)
  ProcessControl.run("fio --name=test --filename=#{dev.path} --rw=randread --ioengine=libaio --direct=1 --size=#{@param[0]}m --ba=#{iosize}k --bs=#{iosize}k --iodepth=32")
  ProcessControl.run("sync")
  drop_caches
end


Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-43404603
.

@akiradeveloper
Copy link
Contributor Author

ok, I understand. Perhaps the best is to add another variable to the
profile, and key off that. eg, test_scale = :small
What do you think?
So we can access the variable from the test codes like this?

sz = config.test_scale == :small ? 1 : 128

@akiradeveloper
Copy link
Contributor Author

I will do 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

No branches or pull requests

2 participants