Skip to content

Instantly share code, notes, and snippets.

@furushchev
Last active May 4, 2018 05:56
Show Gist options
  • Save furushchev/4e583f750675730428135840250beaf6 to your computer and use it in GitHub Desktop.
Save furushchev/4e583f750675730428135840250beaf6 to your computer and use it in GitHub Desktop.
以下のコマンドをダウンロードして、実行してみてください。→ mongo fetch15/jsk_robot_lifelog --quiet count_msg_types.js
shellPrint(db.fetch15.aggregate([
// {'$limit': 100}, // limit message if it takes too long time.
{'$project': {'_id': 0, '_meta.stored_type': 1}},
{'$group': {'_id': '$_meta.stored_type', 'count': {'$sum': 1}}}
]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment