feat: add Peertube statistics JSON files
All checks were successful
Build and Push Docker Image / build (push) Successful in 11m51s
All checks were successful
Build and Push Docker Image / build (push) Successful in 11m51s
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
server/peertube[[:space:]]data/statistics.peertube_hetzner_default_latency.json filter=lfs diff=lfs merge=lfs -text
|
||||||
|
server/peertube[[:space:]]data/statistics.peertube_hetzner_high_latency.json filter=lfs diff=lfs merge=lfs -text
|
63
server/peertube data/convert-to-ts.js
Normal file
63
server/peertube data/convert-to-ts.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
/* global use, db */
|
||||||
|
// MongoDB Playground
|
||||||
|
// To disable this template go to Settings | MongoDB | Use Default Template For Playground.
|
||||||
|
// Make sure you are connected to enable completions and to be able to run a playground.
|
||||||
|
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
|
||||||
|
// The result of the last command run in a playground is shown on the results panel.
|
||||||
|
// By default the first 20 documents will be returned with a cursor.
|
||||||
|
// Use 'console.log()' to print to the debug output.
|
||||||
|
// For more documentation on playgrounds please refer to
|
||||||
|
// https://www.mongodb.com/docs/mongodb-vscode/playgrounds/
|
||||||
|
use("statistics");
|
||||||
|
|
||||||
|
db.peertube.aggregate([
|
||||||
|
{
|
||||||
|
$set: {
|
||||||
|
player: {
|
||||||
|
$function: {
|
||||||
|
lang: "js",
|
||||||
|
args: ["$player"],
|
||||||
|
body: function (str) {
|
||||||
|
try {
|
||||||
|
return JSON.parse(str);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof str === "object") {
|
||||||
|
return str;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
peers: {
|
||||||
|
$function: {
|
||||||
|
lang: "js",
|
||||||
|
args: ["$peers"],
|
||||||
|
body: function (str) {
|
||||||
|
try {
|
||||||
|
return JSON.parse(str);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof str === "object") {
|
||||||
|
return str;
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$out: {
|
||||||
|
db: "statistics",
|
||||||
|
coll: "peertube_ts",
|
||||||
|
timeseries: {
|
||||||
|
timeField: "timestamp",
|
||||||
|
metaField: "tags",
|
||||||
|
granularity: "seconds",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
BIN
server/peertube data/statistics.peertube_hetzner_default_latency.json
(Stored with Git LFS)
Normal file
BIN
server/peertube data/statistics.peertube_hetzner_default_latency.json
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
server/peertube data/statistics.peertube_hetzner_high_latency.json
(Stored with Git LFS)
Normal file
BIN
server/peertube data/statistics.peertube_hetzner_high_latency.json
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user