prec / cpp-stopwatch

Automatically exported from code.google.com/p/cpp-stopwatch
Other
0 stars 0 forks source link

Markdown report #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I use bat to run exe with you lib like

@echo Client sending request via Named pipes using custom objects reusing 
initialized resources
@echo -------------

Stopwatch outputs
================================================================================
==============
Tracking performance: Client process requests ~0.1kb and gets ~1kb response  of 
server process
================================================================================
==============
  *  Avg. time 4.40001e-005 sec
  *  Min. time 0 sec
  *  Max. time 0.00100017 sec
  *  Tot. time 0.0880003 sec
  *  Stops 2000

I could be could if instead of "=" just output **Tracking performance: Client 
process requests ~0.1kb and gets ~1kb response  of server process**.

So my bat but gives H2 size, you lib will give Bold, list of * is OK bullet 
list in terms of markdown.

I used many markups but this is so cool and usable.

So feature is 
sw.report_all(SW_LANG_MARKDOWN)

Either can add SW_LANG_YAML and SW_LANG_CSV.

Thanks

Original issue reported on code.google.com by asd.and....@gmail.com on 16 Jan 2013 at 8:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
## Client sending raw bytes via MS-RPC  reusing initialized resources

c:\ipc\Debug>nativeclient.exe -m rpc -d bytes -r
Client started
Request size :100 kb
Response size was :1000 kb
Request size :50 kb
Response size was :500 kb
Message size :10 kb
Response size was :100 kb
Message size :1024 bytes
Response size was :10 kb
Message size :102 bytes
Response size was :1024 bytes
Request size :100 kb
Response size was :1000 kb
Request size :50 kb
Response size was :500 kb
Message size :10 kb
Response size was :100 kb
Message size :1024 bytes
Response size was :10 kb
Message size :102 bytes
Response size was :1024 bytes

**Client process requests ~100kb and gets ~1000kb response of server process**

  *  Avg. time 0.00370047 sec
  *  Min. time 0.00300002 sec
  *  Max. time 0.00400162 sec
  *  Tot. time 0.0370047 sec
  *  Stops 10

Original comment by asd.and....@gmail.com on 25 Jan 2013 at 9:09

GoogleCodeExporter commented 9 years ago
    if (lang == StopwatchReportLang::MARKDOWN){

    output << std::endl;
    output << "**" << perf_name << "**" << std::endl;
    output << std::endl;
    output << "  *  Avg. time " << (perf_info.total_time / (long double) perf_info.stops) << " sec" << std::endl;
    output << "  *  Min. time " << (perf_info.min_time) << " sec" << std::endl;
    output << "  *  Max. time " << (perf_info.max_time) << " sec" << std::endl;
    output << "  *  Tot. time " << (perf_info.total_time) << " sec" << std::endl;

    ostringstream stops;
    stops << perf_info.stops;

    output << "  *  Stops " << stops.str() << std::endl;
    output << std::endl;
    }

Original comment by asd.and....@gmail.com on 25 Jan 2013 at 9:10

GoogleCodeExporter commented 9 years ago
stopwatch.set_lang(StopwatchReportLang::MARKDOWN);

Original comment by asd.and....@gmail.com on 25 Jan 2013 at 9:11