blob: d3b2e6ca0d951a34416f68ab9fce9d7b877c48f7 [file] [log] [blame]
Shinichiro Hamajicba1fb42016-02-02 18:01:45 +09001// Copyright 2016 Google Inc. All rights reserved
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
Koichi Shiraishidf8cd052016-09-06 15:05:35 +090015// +build ignore
16
Shinichiro Hamajicba1fb42016-02-02 18:01:45 +090017#include <string>
18#include <vector>
19
20#include "flags.h"
21#include "string_piece.h"
22#include "strutil.h"
23#include "timeutil.h"
24
25using namespace std;
26
27int main() {
28 g_flags.enable_stat_logs = true;
29 string s;
30 while (s.size() < 400000) {
31 if (!s.empty())
32 s += ' ';
33 s += "frameworks/base/docs/html/tv/adt-1/index.jd";
34 }
35
36 ScopedTimeReporter tr("WordScanner");
37 static const int N = 1000;
38 for (int i = 0; i < N; i++) {
39 vector<StringPiece> toks;
40 WordScanner(s).Split(&toks);
41 }
42}