This repository has been archived by the owner on May 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from peitschie/benchmark-cc
Compile the benchmark file set using CC
- Loading branch information
Showing
25 changed files
with
198 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
COPY_FILES(BENCHMARK_HTML ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} | ||
1page.odt | ||
10pages.odt | ||
100pages.odt | ||
1000pages.odt | ||
index.html | ||
) | ||
|
||
FILE(GLOB BENCHMARK_JS "${CMAKE_CURRENT_SOURCE_DIR}/js/*.js") | ||
|
||
FOREACH(JSFILE ${BENCHMARK_JS}) | ||
set(BENCHMARK_CLOSURE_ARGS ${BENCHMARK_CLOSURE_ARGS} --js ${JSFILE}) | ||
ENDFOREACH(JSFILE) | ||
|
||
add_custom_command( | ||
OUTPUT benchmark.js-target | ||
|
||
# from webodf.js target (DEPENDS webodf.js) | ||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/webodf/webodf.js ${CMAKE_CURRENT_BINARY_DIR} | ||
|
||
COMMAND ${Java_JAVA_EXECUTABLE} | ||
ARGS -jar ${CLOSURE_JAR} | ||
${BENCHMARK_CLOSURE_ARGS} | ||
--transform_amd_modules | ||
--process_common_js_modules | ||
--common_js_entry_module HTMLBenchmark.js | ||
--common_js_module_path_prefix ${CMAKE_CURRENT_SOURCE_DIR}/js | ||
--compilation_level SIMPLE_OPTIMIZATIONS | ||
--formatting PRETTY_PRINT | ||
--js_output_file "benchmark.js-" | ||
|
||
COMMAND ${CMAKE_COMMAND} ARGS -E rename "benchmark.js-" "benchmark.js" | ||
|
||
DEPENDS ClosureCompiler webodf.js-target | ||
) | ||
|
||
add_custom_target(html-benchmark DEPENDS benchmark.js-target ${BENCHMARK_HTML}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>WebODF performance and benchmarking tool</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | ||
<style> | ||
body { | ||
font-family: Helvetic, sans-serif; | ||
} | ||
|
||
#benchmarkView { | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
width: 400px; | ||
left: 0; | ||
background-color: #70a186; | ||
} | ||
|
||
#documentView { | ||
position: fixed; | ||
top: 0; | ||
bottom: 0; | ||
left: 400px; | ||
right: 0; | ||
overflow: auto; | ||
} | ||
|
||
#benchmarkResults .status { | ||
display: none; | ||
} | ||
|
||
#documentView *:focus { | ||
outline: none; | ||
} | ||
|
||
#wizardPrompt { | ||
position: fixed; | ||
top: 20px; | ||
right: 20px; | ||
border: 1px solid orangered; | ||
background-color: orange; | ||
-moz-border-radius: 5px; | ||
-webkit-border-radius: 5px; | ||
min-width: 100px; | ||
min-height: 100px; | ||
padding: 10px; | ||
text-align: center; | ||
display: none; | ||
z-index: 100; | ||
} | ||
|
||
#wizardMessage { | ||
text-align: left; | ||
} | ||
|
||
#wizardPrompt h2 { | ||
margin: 0; | ||
color: #671a00; | ||
} | ||
|
||
#loadingScreen { | ||
position: fixed; | ||
top: 100px; | ||
left: 100px; | ||
right: 100px; | ||
background-color: #c3c3c3; | ||
-moz-border-radius: 5px; | ||
-webkit-border-radius: 5px; | ||
border: 1px solid black; | ||
text-align: center; | ||
vertical-align: middle; | ||
z-index: 100; | ||
} | ||
</style> | ||
|
||
<script src="webodf.js" type="text/javascript"></script> | ||
<script type="text/javascript"> | ||
runtime.currentDirectory = function () { | ||
return "../../webodf/lib"; | ||
}; | ||
runtime.libraryPaths = function () { | ||
return [ | ||
runtime.currentDirectory(), | ||
"../../../webodf/lib" | ||
]; | ||
}; | ||
</script> | ||
|
||
</head> | ||
<body> | ||
<div id="loadingScreen"> | ||
<h1>Loading required files. This may take a while.</h1> | ||
</div> | ||
<div id="benchmarkView"> | ||
<h1>Benchmark results</h1> | ||
<table id="benchmarkResults"> | ||
<thead> | ||
<tr> | ||
<td class="action">Action</td> | ||
<td class="status">Status</td> | ||
<td class="elapsed">Elapsed time (ms)</td> | ||
</tr> | ||
</thead> | ||
</table> | ||
</div> | ||
<div id="documentView"> | ||
<div id="wizardPrompt"> | ||
<h2>Interaction required:</h2> | ||
<div id="wizardMessage"></div> | ||
<button id="wizardClose">Done!</button> | ||
</div> | ||
<div id="canvas"></div> | ||
</div> | ||
<script src="benchmark.js" type="text/javascript"></script> | ||
<script> | ||
var benchmark = new module$HTMLBenchmark(); | ||
benchmark.start(); | ||
</script> | ||
</body> | ||
</html> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.