Git Product home page Git Product logo

speedtest's Issues

Creating bin files on Windows

This is great! Just wanted to drop a note that Windows also has a tool for creating bin files from the command line. The Command Prompt must be opened as Administrator, but then you can just do this:

fsutil file createnew 1mb.bin 1000000
fsutil file createnew 5mb.bin 5000000
fsutil file createnew 10mb.bin 10000000
fsutil file createnew 100mb.bin 100000000
fsutil file createnew 1000mb.bin 1000000000

tweak dd instructions for reduced disk usage

You might want to change the 'dd' instructions a bit. If you use sparse files, you can have each file only consume one block of storage on the disk while having a much bigger file. To do this, you write a single block with dd and "seek" to the last block of the file.

For instance:

   dd if=/dev/zero of=1mb.bin   bs=1024 count=1 seek=$((  1*(1<<10) - 1))
   dd if=/dev/zero of=5mb.bin   bs=1024 count=1 seek=$((  5*(1<<10) - 1))
   dd if=/dev/zero of=10mb.bin  bs=1024 count=1 seek=$(( 10*(1<<10) - 1))
   dd if=/dev/zero of=100mb.bin bs=1024 count=1 seek=$((100*(1<<10) - 1))

$ ls -l *.bin; du -cs *.bin
-rw-rw-r-- 1 dave dave 1048576000 May  3 10:25 1000mb.bin
-rw-rw-r-- 1 dave dave  104857600 May  3 10:15 100mb.bin
-rw-rw-r-- 1 dave dave   10485760 May  3 10:15 10mb.bin
-rw-rw-r-- 1 dave dave    1048576 May  3 10:26 1mb.bin
-rw-rw-r-- 1 dave dave    5242880 May  3 10:15 5mb.bin
4	1000mb.bin
4	100mb.bin
4	10mb.bin
8	1mb.bin
4	5mb.bin
24	total

'du' shows the true on-disk storage size of the files.

missing comma in "dec" function

this line is missing in the second if

     res += '.';
        if ( ! flo && diff ) {
          res += '.';
          for ( let i = 0; i < diff; i++ ) {
            res += '0';
          }
        }

        if ( flo && diff > 0 ) {
          for ( let i = 0; i < diff; i++ ) {
            res += '0';
          }
        }

should be change to

        if ( ! flo && diff ) {
          res += '.';
          for ( let i = 0; i < diff; i++ ) {
            res += '0';
          }
        }

        if ( flo && diff > 0 ) {
          res += '.';
          for ( let i = 0; i < diff; i++ ) {
            res += '0';
          }
        }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.