Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
D
Distributed-Search-Engine
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tammam.alsoleman
Distributed-Search-Engine
Commits
ee63c939
Commit
ee63c939
authored
Jan 22, 2026
by
tammam.alsoleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit to show the execution time
parent
eb5ae0d6
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
118 deletions
+97
-118
SearchClient.java
src/main/java/com/distributed/search/grpc/SearchClient.java
+3
-2
index.html
src/main/resources/index.html
+94
-116
No files found.
src/main/java/com/distributed/search/grpc/SearchClient.java
View file @
ee63c939
...
...
@@ -50,7 +50,7 @@ public class SearchClient {
if
(
stubs
.
isEmpty
())
{
return
Collections
.
emptyList
();
}
long
startTime
=
System
.
currentTimeMillis
();
// Phase 1: Aggregate Global Counts
Map
<
String
,
Integer
>
globalTermCounts
=
new
HashMap
<>();
int
filesPerWorker
=
(
int
)
Math
.
ceil
((
double
)
allFiles
.
size
()
/
stubs
.
size
());
...
...
@@ -101,7 +101,8 @@ public class SearchClient {
}
catch
(
Exception
e
)
{
System
.
err
.
println
(
"Worker "
+
address
+
" Phase 2 error"
);
}
currentFileIndex
+=
count
;
}
long
endTime
=
System
.
currentTimeMillis
();
System
.
out
.
println
(
">>> Distributed Search took: "
+
(
endTime
-
startTime
)
+
" ms"
);
// --- return the sorted list ---
finalResults
.
sort
((
a
,
b
)
->
Double
.
compare
(
b
.
getScore
(),
a
.
getScore
()));
return
finalResults
;
...
...
src/main/resources/index.html
View file @
ee63c939
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment