Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c57472
commit 79d4385
Showing
53 changed files
with
1,024 additions
and
184 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
com.mongodb.tools/src/com/mongodb/tools/driver/StatsHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,43 @@ | |||
package com.mongodb.tools.driver; | |||
|
|||
import com.mongodb.BasicDBObject; | |||
import com.mongodb.CommandResult; | |||
|
|||
public class StatsHelper { | |||
|
|||
private static final String SIZE = "size"; | |||
private static final String COUNT = "count"; | |||
private static final String STORAGE = "storageSize"; | |||
private static final String AVG_OBJ = "avgObjSize"; | |||
private static final String PADDING = "paddingFactor"; | |||
private static final String INDEX_SIZES = "indexSizes"; | |||
|
|||
public static double getSize(CommandResult stats) { | |||
return stats.getDouble(SIZE); | |||
} | |||
|
|||
public static double getCount(CommandResult stats) { | |||
return stats.getDouble(COUNT); | |||
} | |||
|
|||
public static double getStorage(CommandResult stats) { | |||
return stats.getDouble(STORAGE); | |||
} | |||
|
|||
public static double getAvgObj(CommandResult stats) { | |||
return stats.getDouble(AVG_OBJ); | |||
} | |||
|
|||
public static double getPadding(CommandResult stats) { | |||
return stats.getDouble(PADDING); | |||
} | |||
|
|||
public static BasicDBObject getIndexSizes(CommandResult stats) { | |||
return (BasicDBObject) stats.get(INDEX_SIZES); | |||
} | |||
|
|||
public static String formatAsBytes(double value) { | |||
return String.valueOf(value); | |||
} | |||
|
|||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...pensagres.mongodb.ide.core/src/fr/opensagres/mongodb/ide/core/model/stats/IndexStats.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
package fr.opensagres.mongodb.ide.core.model.stats; | |||
|
|||
public class IndexStats { | |||
|
|||
private final CollectionStats collectionStats; | |||
private final String id; | |||
private final double indexSize; | |||
|
|||
public IndexStats(CollectionStats collectionStats, String id, double indexSize) { | |||
this.collectionStats = collectionStats; | |||
this.id = id; | |||
this.indexSize = indexSize; | |||
} | |||
|
|||
public String getId() { | |||
return id; | |||
} | |||
|
|||
public double getIndexSize() { | |||
return indexSize; | |||
} | |||
|
|||
public double getPercentIndexSize() { | |||
double totalSize = collectionStats.getListStats().getTotalIndexSize(); | |||
if (indexSize == 0) { | |||
return 0; | |||
} | |||
return (indexSize / totalSize) * 100; | |||
} | |||
} |
Binary file modified
BIN
-569 Bytes
(73%)
...es.mongodb.ide.launching/bin/fr/opensagres/mongodb/ide/launching/internal/Activator.class
Binary file not shown.
Binary file modified
BIN
-102 Bytes
(96%)
...ngodb.ide.launching/bin/fr/opensagres/mongodb/ide/launching/internal/ImageResources.class
Binary file not shown.
Binary file modified
BIN
+1.67 KB
(130%)
...de.launching/bin/fr/opensagres/mongodb/ide/launching/internal/ServerLauncherManager.class
Binary file not shown.
Binary file modified
BIN
-1.91 KB
(78%)
...launching/bin/fr/opensagres/mongodb/ide/launching/internal/dialogs/AddRuntimeDialog.class
Binary file not shown.
Binary file modified
BIN
+2.3 KB
(170%)
...godb/ide/launching/internal/launchConfigurations/ProcessLaunchConfigurationDelegate.class
Binary file not shown.
Binary file modified
BIN
+984 Bytes
(140%)
.../ide/launching/internal/launchConfigurations/mongo/MongoLaunchConfigurationDelegate.class
Binary file not shown.
Binary file modified
BIN
-1020 Bytes
(61%)
...ngodb/ide/launching/internal/launchConfigurations/mongo/MongoLaunchConfigurationTab.class
Binary file not shown.
Binary file modified
BIN
-328 Bytes
(80%)
.../ide/launching/internal/launchConfigurations/mongo/MongoLaunchConfigurationTabGroup.class
Binary file not shown.
Binary file modified
BIN
+775 Bytes
(120%)
...de/launching/internal/launchConfigurations/mongod/MongodLaunchConfigurationDelegate.class
Binary file not shown.
Binary file modified
BIN
-3.35 KB
(67%)
...odb/ide/launching/internal/launchConfigurations/mongod/MongodLaunchConfigurationTab.class
Binary file not shown.
Binary file modified
BIN
-326 Bytes
(81%)
...de/launching/internal/launchConfigurations/mongod/MongodLaunchConfigurationTabGroup.class
Binary file not shown.
Binary file modified
BIN
-302 Bytes
(78%)
...opensagres/mongodb/ide/launching/internal/launchConfigurations/mongod/MongodProcess.class
Binary file not shown.
Binary file modified
BIN
-1.19 KB
(68%)
...ing/bin/fr/opensagres/mongodb/ide/launching/internal/preferences/AbstractTableBlock.class
Binary file not shown.
Binary file modified
BIN
-4.16 KB
(29%)
...b/ide/launching/internal/preferences/InstalledRuntimesBlock$RuntimesContentProvider.class
Binary file not shown.
Binary file modified
BIN
+2.91 KB
(130%)
...bin/fr/opensagres/mongodb/ide/launching/internal/preferences/InstalledRuntimesBlock.class
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
...fr/opensagres/mongodb/ide/launching/internal/preferences/MongoRuntimePreferencePage.class
Binary file not shown.
Binary file modified
BIN
+87 Bytes
(100%)
...mongodb.ide.ui/bin/fr/opensagres/mongodb/ide/ui/editors/collection/CollectionEditor.class
Binary file not shown.
Binary file modified
BIN
+125 Bytes
(100%)
fr.opensagres.mongodb.ide.ui/bin/fr/opensagres/mongodb/ide/ui/internal/Messages.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.