From 9d4720babf983d31be6c74aaeba10551bc0192c7 Mon Sep 17 00:00:00 2001 From: Yusuf Shakeel Date: Sat, 10 Oct 2020 22:22:00 +0530 Subject: [PATCH 1/3] storage size notes added in readme file --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/README.md b/README.md index f7e23ae..3e36d92 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ const CouponJS = require('couponjs'); * [String format rule and prefix-suffix combo](#string-format-rule-and-prefix-suffix-combo) * [Object format rule and prefix-suffix combo](#object-format-rule-and-prefix-suffix-combo) * [Possible number of coupons](#possible-number-of-coupons) +* [Storage size](#storage-size) * [Performance](#performance) * [License](#license) * [Back this project](#back-this-project) @@ -626,6 +627,55 @@ Points to note! * Different mix of character sets can be used to change the total number of possible coupons that can be generated. * Speed and generation of coupons will also depend on the hardware used. +## Storage size + +In this section we estimate the rough storage size based on the coupon size and number of coupons generated. + +Assumption: +* Using UTF8 characters and each character taking up 1 byte storage. + +|Total Characters |Number of coupons |Size (MB) |Size (GB) | +|----------------:|---------------------:|-----------------:|-----------------:| +|6 |1000 |0.006 |0.000006 | +|6 |10000 |0.060 |0.000060 | +|6 |100000 |0.600 |0.000600 | +|6 |1000000 |6.000 |0.006000 | +|6 |10000000 |60.000 |0.060000 | +|6 |100000000 |600.000 |0.600000 | +|6 |1000000000 |6000.000 |6.000000 | + +|Total Characters |Number of coupons |Size (MB) |Size (GB) | +|----------------:|---------------------:|-----------------:|-----------------:| +|8 |1000 |0.008 |0.000008 | +|8 |10000 |0.080 |0.000080 | +|8 |100000 |0.800 |0.000800 | +|8 |1000000 |8.000 |0.008000 | +|8 |10000000 |80.000 |0.080000 | +|8 |100000000 |800.000 |0.800000 | +|8 |1000000000 |8000.000 |8.000000 | + +|Total Characters |Number of coupons |Size (MB) |Size (GB) | +|----------------:|---------------------:|-----------------:|-----------------:| +|12 |1000 |0.012 |0.000012 | +|12 |10000 |0.120 |0.000120 | +|12 |100000 |1.200 |0.001200 | +|12 |1000000 |12.000 |0.012000 | +|12 |10000000 |120.000 |0.120000 | +|12 |100000000 |1200.000 |1.200000 | +|12 |1000000000 |12000.000 |12.000000 | + +|Total Characters |Number of coupons |Size (MB) |Size (GB) | +|----------------:|---------------------:|-----------------:|-----------------:| +|16 |1000 |0.016 |0.000016 | +|16 |10000 |0.160 |0.000160 | +|16 |100000 |1.600 |0.001600 | +|16 |1000000 |16.000 |0.016000 | +|16 |10000000 |160.000 |0.160000 | +|16 |100000000 |1600.000 |1.600000 | +|16 |1000000000 |16000.000 |16.000000 | + + + ## Performance To check performance run the following command in the terminal. From f31c2a627c43c8a39e7c83dc8f6add9ab6361bf8 Mon Sep 17 00:00:00 2001 From: Yusuf Shakeel Date: Sat, 10 Oct 2020 22:23:48 +0530 Subject: [PATCH 2/3] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e36d92..7287ce4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is a simple coupon creation project using NodeJS. [![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/yusufshakeel/couponjs) -[![npm version](https://img.shields.io/badge/npm-0.8.12-blue.svg)](https://www.npmjs.com/package/couponjs) +[![npm version](https://img.shields.io/badge/npm-0.8.13-blue.svg)](https://www.npmjs.com/package/couponjs) [![Build Status](https://travis-ci.com/yusufshakeel/couponjs.svg?branch=master)](https://travis-ci.com/yusufshakeel/couponjs) [![Coverage Status](https://coveralls.io/repos/github/yusufshakeel/couponjs/badge.svg?branch=master)](https://coveralls.io/github/yusufshakeel/couponjs?branch=master) From 7abc8dc070d01ff71f0746d6e00f4ad4e64eaa21 Mon Sep 17 00:00:00 2001 From: Yusuf Shakeel Date: Sat, 10 Oct 2020 22:23:55 +0530 Subject: [PATCH 3/3] 0.8.13 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e4198a..007c779 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "couponjs", - "version": "0.8.12", + "version": "0.8.13", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d793045..f3113b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "couponjs", - "version": "0.8.12", + "version": "0.8.13", "description": "This is a simple coupon creation project using NodeJS.", "main": "index.js", "scripts": {