Measure (max) memory usage with IPython—like timeit but memit

In fact, it already exists, as part of the pragmatically named memory_profiler package: In [2]: %memit np.zeros(1e7) maximum of 3: 76.402344 MB per loop More info at https://github.com/pythonprofilers/memory_profiler#ipython-integration Edit: To use this, you first need to load it as an IPython extension: %load_ext memory_profiler To make IPython always load the memory_profiler extension upon startup, add … Read more

Quantifiable metrics (benchmarks) on the usage of header-only c++ libraries

Summary (notable points): Two packages benchmarked (one with 78 compilation units, one with 301 compilation units) Traditional Compiling (Multi Unit Compilation) resulted in a 7% faster application (in the 78 unit package); no change in application runtime in the 301 unit package. Both Traditional Compiling and Header-only benchmarks used the same amount of memory when … Read more

How does jsPerf determine which of the code snippets is fastest?

I wrote Benchmark.js, which jsPerf uses. “ops/sec” stands for operations per second. That is how many times a test is projected to execute in a second. A test is repeatedly executed until it reaches the minimum time needed to get a percentage uncertainty for the measurement of less than or equal to 1%. The number … Read more

Definition of Connect, Processing, Waiting in apache bench

By looking at the source code we find these timing points: apr_time_t start, /* Start of connection */ connect, /* Connected, start writing */ endwrite, /* Request written */ beginread, /* First byte of input */ done; /* Connection closed */ And when request is done some timings are stored as: s->starttime = c->start; s->ctime … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)