[FIX] benchmarks: two small fixes

This commit is contained in:
Géry Debongnie
2019-06-11 11:29:31 +02:00
parent 438e2fbc2e
commit 9a3e1ed99e
3 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -49,11 +49,12 @@ class App extends owl.Component {
updateSomeMessages() {
startMeasure("update every 10th");
const setState = owl.Observer.set;
const messages = this.state.messages;
for (let i = 0; i < this.state.messages.length; i += 10) {
const msg = Object.assign({}, messages[i]);
msg.author += '!!!';
this.set(messages, i, msg);
setState(messages, i, msg);
}
stopMeasure();
}
+2 -2
View File
@@ -19,8 +19,8 @@
</div>
<div t-name="Message" class="message">
<span class="author"><t t-esc="props.author"/></span>
<span class="msg"><t t-esc="props.msg"/></span>
<span class="author"><t t-esc="props.message.author"/></span>
<span class="msg"><t t-esc="props.message.msg"/></span>
<button class="remove" t-on-click="removeMessage">Remove</button>
<t t-widget="Counter"/>
</div>
+2 -2
View File
@@ -32,8 +32,8 @@ class OWLHandler(SimpleHTTPRequestHandler):
OWLHandler.extensions_map['.js'] = 'application/javascript'
if __name__ == "__main__":
print("Owl Extras")
print("----------")
print("Owl Tools")
print("---------")
print("Server running on: {}".format(URL))
httpd = HTTPServer((HOST, PORT), OWLHandler)
threading.Thread(target=httpd.serve_forever, daemon=True).start()