Skip to content

Commit

Permalink
Add limitation of full search
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuichiueda committed Sep 5, 2017
1 parent 64efd25 commit 8474eee
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions benchmark/index.cgi.perf
@@ -0,0 +1,16 @@
#!/bin/bash -xv
source "$(dirname $0)/../bin/conf"
tmp=/tmp/$$

url='https://bashcms2.ueda.tech'

awk '{print $3}' $datadir/{post,page}_list |
sed 's;s/;=;' |
sed "s;^;${url}?;" > $tmp-list

time head -n 1000 $tmp-list |
xargs -P0 -n 1 curl 2> /dev/null |
grep '<title>' |
nl

rm -f $tmp-*
2 changes: 1 addition & 1 deletion bin/full_search.cgi
Expand Up @@ -15,7 +15,7 @@ Content-Type: text/html
FIN

[ -n "$word" ] &&
grep " .*$word" "$datadir/all_markdown" |
grep -m 100 " .*$word" "$datadir/all_markdown" |
awk '{print $1}' |
uniq |
tac |
Expand Down
2 changes: 1 addition & 1 deletion bin/view/default.css
Expand Up @@ -33,7 +33,7 @@ padding:3px 20px; margin:15px 0px; background-color:#EEE; }
#article-footer { width:100%; color:white; background-color:#555; margin:10px 0px; }
#article-footer a { color:white; }

#widgets { width:320px; margin:20px; padding-left:20px; float:right; }
#widgets { width:320px; margin:20px; float:right; }
#widgets h1{ font-weight:normal; width:100%; font-size:100%;
padding:0px 20px; background-color:#555; color:white; }
#widgets h2{ font-weight:normal; width:100%; font-size:80%;
Expand Down

0 comments on commit 8474eee

Please sign in to comment.