Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
xinaxu committed Apr 16, 2024
1 parent 5d0e7df commit 9a826d9
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,40 @@ There is no centralized orchestrator to manage retrieval queue or work. Instead,
## Result Snapshot 2024-04-16
The retrieval success ratio and count for each SP per day per protocol has been exported into [result.zip](./result.zip)

Query used to generate the data
```javascript
db.task_result.aggregate([
{
$group: {
_id: {
sp: "$task.provider.id",
type: "$task.module",
date: {
$dateToString: {
format: "%Y-%m-%d",
date: "$created_at",
timezone: "UTC",
}
},
},
count: { $sum: 1 },
success: { $sum: { $cond: [{ $eq: ["$result.success", true] }, 1, 0] } },
}
},
{
$project: {
_id: 0,
sp: "$_id.sp",
type: "$_id.type",
date: "$_id.date",
success: "$success",
total: "$count",
ratio: { $divide: ["$success", "$count"] },
}
}
])
```

## Workers
Workers refer to the unit that consumes the worker queue. There are 4 basic types of workers as of now.

Expand Down

0 comments on commit 9a826d9

Please sign in to comment.