问题
I'd like to test out some erorr handling code, so I'd like to find a consistent way of causing a slow aggregation operation, ideally without needing a lot of data.
For regular mongo queries, {$where: "sleep(10000) && true" }
does this well, but mongo aggregations don't support javascript operators.
来源:https://stackoverflow.com/questions/56447145/is-there-a-good-way-to-intentionally-cause-a-slow-mongo-aggregation-operation