diff --git a/image/decoders/nsPNGDecoder.cpp b/image/decoders/nsPNGDecoder.cpp index 6dba481d51..db3a9b6531 100644 --- a/image/decoders/nsPNGDecoder.cpp +++ b/image/decoders/nsPNGDecoder.cpp @@ -559,6 +559,7 @@ nsPNGDecoder::nsPNGDecoder(RasterImage* aImage, RasterImage* aImageExtra) , PngSbxActivated(false) #endif { + mImageString = getImageURIString(aImage != nullptr? aImage : aImageExtra); #if defined(NACL_SANDBOX_USE_NEW_CPP_API) || defined(WASM_SANDBOX_USE_NEW_CPP_API) || defined(PS_SANDBOX_USE_NEW_CPP_API) std::string hostString = getHostStringFromImage(aImage != nullptr? aImage : aImageExtra); rlbox_sbx_shared = pngSandboxManager.createSandbox(hostString); @@ -2617,7 +2618,8 @@ nsPNGDecoder::FinishInternal() if(!PngMaybeTooSmall) { auto diff = PngBench.JustFinish(); - printf("Capture_Time:PNG_destroy,%llu,%llu|\n", invPng, diff); + std::string tag = "PNG_destroy(" + mImageString + ")"; + printf("Capture_Time:%s,%llu,%llu|\n", tag.c_str(), invPng, diff); invPng++; } diff --git a/image/decoders/nsPNGDecoder.h b/image/decoders/nsPNGDecoder.h index 1b3cea86e4..d5f9897c83 100644 --- a/image/decoders/nsPNGDecoder.h +++ b/image/decoders/nsPNGDecoder.h @@ -203,7 +203,7 @@ inline std::string getImageURIString(RasterImage* aImage) if(imageURI == nullptr) { return ""; } nsCString spec; - nsresult rv = imageURI->GetSpec(spec); + imageURI->GetSpec(spec); std::string ret = spec.get(); return ret; } @@ -361,6 +361,8 @@ class nsPNGDecoder : public Decoder size_t mLastChunkLength; public: + std::string mImageString; + #if defined(NACL_SANDBOX_USE_NEW_CPP_API) || defined(WASM_SANDBOX_USE_NEW_CPP_API) || defined(PS_SANDBOX_USE_NEW_CPP_API) // RLBoxSandbox* rlbox_png = nullptr; // std::once_flag rlbox_png_init; diff --git a/testing/talos/talos.json b/testing/talos/talos.json index 57bf12db9e..378bceeb25 100644 --- a/testing/talos/talos.json +++ b/testing/talos/talos.json @@ -63,13 +63,13 @@ "pagesets_name": "tp5n.zip" }, "jpeg_tests": { - "tests": ["jpeg_perf", "jpeg_page_render", "jpeg_page_render_25", "jpeg_page_render_50"] + "tests": ["jpeg_page_render", "png_page_render", "jpeg_page_render", "jpeg_page_render_25", "jpeg_page_render_50"] }, "zlib_test": { "tests": ["zlib_page_render"] }, "rlbox_test": { - "tests": ["jpeg_page_render", "png_page_render", "zlib_page_render"] + "tests": [ "jpeg_perf", "png_perf", "zlib_page_render"] }, "rlbox_scaling": { "tests": ["jpeg_scaling_1", "jpeg_scaling_1_1", "jpeg_scaling_1_2", "jpeg_scaling_1_3", "jpeg_scaling_1_4", "jpeg_scaling_1_5", "jpeg_scaling_1_6", "jpeg_scaling_2", "jpeg_scaling_3", "jpeg_scaling_4", "jpeg_scaling_5", "jpeg_scaling_6", "jpeg_scaling_7"] diff --git a/testing/talos/talos/test.py b/testing/talos/talos/test.py index 951f870718..400972db3f 100644 --- a/testing/talos/talos/test.py +++ b/testing/talos/talos/test.py @@ -791,7 +791,24 @@ class jpeg_perf(PageloaderTest): tpmanifest = '${talos}/tests/jpeg_perf/tests.manifest' tpcycles = 1 tploadnocache = True - tppagecycles = 1000 + tppagecycles = 4000 + tpmozafterpaint = True + gecko_profile_interval = 1 + gecko_profile_entries = 10000000 + filters = filter.ignore_first.prepare(5) + filter.median.prepare() + unit = 'ms' + timeout = 720000 + + +@register_test() +class png_perf(PageloaderTest): + """ + Test the time taken to render png images of different quality + """ + tpmanifest = '${talos}/tests/png_perf/tests.manifest' + tpcycles = 1 + tploadnocache = True + tppagecycles = 4000 tpmozafterpaint = True gecko_profile_interval = 1 gecko_profile_entries = 10000000 diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_1920.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_1920.png new file mode 100644 index 0000000000..2cd7153c3f Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_1920.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_240.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_240.png new file mode 100644 index 0000000000..ed4b5c392a Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_240.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_480.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_480.png new file mode 100644 index 0000000000..daff793802 Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_best_480.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_1920.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_1920.png new file mode 100644 index 0000000000..9ec1322c2f Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_1920.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_240.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_240.png new file mode 100644 index 0000000000..e753a85695 Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_240.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_480.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_480.png new file mode 100644 index 0000000000..3559a9073e Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_default_480.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_1920.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_1920.png new file mode 100644 index 0000000000..4e87b5a68c Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_1920.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_240.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_240.png new file mode 100644 index 0000000000..839f91873f Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_240.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_480.png b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_480.png new file mode 100644 index 0000000000..ec2297c0a1 Binary files /dev/null and b/testing/talos/talos/tests/png_perf/generated_pngs/artificial_rgb8bit_none_480.png differ diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_1920.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_1920.html new file mode 100644 index 0000000000..5b8ecd295a --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_1920.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_240.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_240.html new file mode 100644 index 0000000000..2945d82f12 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_240.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_480.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_480.html new file mode 100644 index 0000000000..43a9e93ab8 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_480.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_1920.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_1920.html new file mode 100644 index 0000000000..93680d7657 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_1920.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_240.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_240.html new file mode 100644 index 0000000000..953f26cbbd --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_240.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_480.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_480.html new file mode 100644 index 0000000000..047fc9e4f1 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_480.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_1920.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_1920.html new file mode 100644 index 0000000000..c0de5be8a6 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_1920.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_240.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_240.html new file mode 100644 index 0000000000..3aa5dfe961 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_240.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_480.html b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_480.html new file mode 100644 index 0000000000..d35c4394a3 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_480.html @@ -0,0 +1,9 @@ + + + + Test image page + + + Test + + diff --git a/testing/talos/talos/tests/png_perf/tests.manifest b/testing/talos/talos/tests/png_perf/tests.manifest new file mode 100644 index 0000000000..d7d2d64997 --- /dev/null +++ b/testing/talos/talos/tests/png_perf/tests.manifest @@ -0,0 +1,9 @@ +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_1920.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_240.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_best_480.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_1920.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_240.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_default_480.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_1920.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_240.html +http://localhost/tests/png_perf/generated_pngs_html/artificial_rgb8bit_none_480.html \ No newline at end of file