From f387845ae04226981aedb0fd0b8b55ee805883f3 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sun, 28 Apr 2019 01:19:58 +0200 Subject: timing --- client/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'client/app.js') diff --git a/client/app.js b/client/app.js index 7635162..8a07f34 100644 --- a/client/app.js +++ b/client/app.js @@ -54,11 +54,13 @@ export default class PhashApp extends Component { } render() { + const { res } = this.state return (

Search by Image

{this.renderQuery()} {this.renderResults()} + {this.renderTiming()}
) } @@ -142,4 +144,12 @@ export default class PhashApp extends Component { ) } + + renderTiming() { + const { res } = this.state + if (res && res.timing) { + return Query completed in {Math.round(res.timing * 1000)} ms + } + return null + } } \ No newline at end of file -- cgit v1.2.3-70-g09d2